Skip to content

Commit

Permalink
A few small staticcheck fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jille committed Jun 22, 2023
1 parent 28696e5 commit 94ed776
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions internal/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ func readConfig(stderr io.Writer, dir, filename string) (string, *config.Config,
if err != nil {
switch err {
case config.ErrMissingVersion:
fmt.Fprintf(stderr, errMessageNoVersion)
fmt.Fprint(stderr, errMessageNoVersion)
case config.ErrUnknownVersion:
fmt.Fprintf(stderr, errMessageUnknownVersion)
fmt.Fprint(stderr, errMessageUnknownVersion)
case config.ErrNoPackages:
fmt.Fprintf(stderr, errMessageNoPackages)
fmt.Fprint(stderr, errMessageNoPackages)
}
fmt.Fprintf(stderr, "error parsing %s: %s\n", base, err)
return "", nil, err
Expand Down
2 changes: 1 addition & 1 deletion internal/sql/catalog/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Schema struct {

func (s *Schema) getFunc(rel *ast.FuncName, tns []*ast.TypeName) (*Function, int, error) {
for i := range s.Funcs {
if strings.ToLower(s.Funcs[i].Name) != strings.ToLower(rel.Name) {
if !strings.EqualFold(s.Funcs[i].Name, rel.Name) {
continue
}

Expand Down
2 changes: 1 addition & 1 deletion internal/sql/validate/param_ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func ParamRef(n ast.Node) (map[int]bool, bool, error) {
}
}), n)
if dollar && nodollar {
return nil, false, errors.New("Can not mix $1 format with ? format")
return nil, false, errors.New("can not mix $1 format with ? format")
}

seen := map[int]bool{}
Expand Down

0 comments on commit 94ed776

Please sign in to comment.