Skip to content

Commit

Permalink
Merge pull request #269 from nicholasxuu/master
Browse files Browse the repository at this point in the history
hotfix health check ent template
  • Loading branch information
HeathLee authored Jan 5, 2021
2 parents f85fff0 + df00b96 commit c874998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/gobay/templates/spec/enttmpl/client.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (c *{{ $client }}) Get(ctx context.Context, id {{ $n.ID.Type }}) (*{{ $n.Na

// CheckHealth try to read a first {{ $n.Name }} entity, okay if NotFound, returns the error if any other error happens.
func (c *{{ $client }}) CheckHealth(ctx context.Context) (error) {
_, err := c.Query().Limit(1).Only(ctx)
_, err := c.Query().Limit(1).All(ctx)
if err != nil && !IsNotFound(err) {
return err
}
Expand Down

0 comments on commit c874998

Please sign in to comment.