Skip to content

Instantly share code, notes, and snippets.

@manakuro
Created December 10, 2021 05:06
Show Gist options
  • Save manakuro/c9a68ee38ab2a9deec55fe0bf8b9c057 to your computer and use it in GitHub Desktop.
Save manakuro/c9a68ee38ab2a9deec55fe0bf8b9c057 to your computer and use it in GitHub Desktop.
func (r *userRepository) Create(ctx context.Context, input model.CreateUserInput) (*model.User, error) {
u, err := r.client.User.Create().SetInput(input).Save(ctx)
if err != nil {
return nil, model.NewDBError(err)
}
return u, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment