Skip to content

Commit

Permalink
feat: [NA] update golagci-lint config; code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vpakhuchyi committed May 7, 2024
1 parent 34b4b9b commit a7bba26
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ linters:
- gochecknoinits # Checks that no init functions are present in Go code.
- godot # Check if comments end in a period
- godox # Tool for detection of FIXME, TODO and other comment keywords
- goerr113 # Golang linter to check the errors handling expressions
- err113 # Golang linter to check the errors handling expressions
- gomnd # An analyzer to detect magic numbers
- ireturn # Accept Interfaces, Return Concrete Types
- interfacebloat # A linter that checks the number of methods inside an interface
Expand Down
2 changes: 1 addition & 1 deletion internal/handler/callback/callbackdata/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Payload struct {

func Parse(data string) (*Payload, error) {
splits := strings.Split(data, "_")
if len(splits) != 2 {
if len(splits) != 2 { //nolint:gomnd,mnd
return nil, fmt.Errorf("invalid callback query data token: %v", splits)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/module/gcp/secrets/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (c Client) GetSecretValue(ctx context.Context, name string) (string, error)
if err != nil {
return "", fmt.Errorf("secret access request: %w", err)
}
if resp.HTTPStatusCode != 200 {
if resp.HTTPStatusCode != 200 { //nolint:gomnd,mnd
return "", fmt.Errorf("secret access request: code=%d, data=%v", resp.HTTPStatusCode, resp.Payload.Data)
}

Expand Down

0 comments on commit a7bba26

Please sign in to comment.