Skip to content

Commit

Permalink
Fix lint problems flagged by golangci-lint 1.60.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpromislow committed Aug 16, 2024
1 parent 6c87545 commit 1a59ca6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/access/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func Create(context *types.APIContext, version *types.APIVersion, typeName string, data map[string]interface{}, into interface{}) error {
schema := context.Schemas.Schema(version, typeName)
if schema == nil {
return fmt.Errorf("failed to find schema " + typeName)
return fmt.Errorf("failed to find schema ", typeName)
}

item, err := schema.Store.Create(context, schema, data)
Expand All @@ -37,7 +37,7 @@ func Create(context *types.APIContext, version *types.APIVersion, typeName strin
func ByID(context *types.APIContext, version *types.APIVersion, typeName string, id string, into interface{}) error {
schema := context.Schemas.Schema(version, typeName)
if schema == nil {
return fmt.Errorf("failed to find schema " + typeName)
return fmt.Errorf("failed to find schema ", typeName)
}

item, err := schema.Store.ByID(context, schema, id)
Expand All @@ -63,7 +63,7 @@ func ByID(context *types.APIContext, version *types.APIVersion, typeName string,
func List(context *types.APIContext, version *types.APIVersion, typeName string, opts *types.QueryOptions, into interface{}) error {
schema := context.Schemas.Schema(version, typeName)
if schema == nil {
return fmt.Errorf("failed to find schema " + typeName)
return fmt.Errorf("failed to find schema %s", typeName)
}

data, err := schema.Store.List(context, schema, opts)
Expand Down
2 changes: 1 addition & 1 deletion parse/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func Body(req *http.Request) (map[string]interface{}, error) {
return valuesToBody(req.MultipartForm.Value), nil
}

if req.PostForm != nil && len(req.PostForm) > 0 {
if len(req.PostForm) > 0 {
return valuesToBody(map[string][]string(req.Form)), nil
}

Expand Down

0 comments on commit 1a59ca6

Please sign in to comment.