Skip to content

Commit

Permalink
Merge pull request #2009 from Shopify/dnwe/fix-nilerr-checks
Browse files Browse the repository at this point in the history
fix: enable nilerr linter and fix iferr checks
  • Loading branch information
dnwe authored Sep 8, 2021
2 parents b64d8eb + 4228af2 commit 16fb95c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ linters:
# - ineffassign
# - misspell
# - nakedret
- nilerr
# - scopelint
- staticcheck
- structcheck
Expand Down
4 changes: 2 additions & 2 deletions alter_configs_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ func (a *AlterConfigsResourceResponse) encode(pe packetEncoder) error {
pe.putInt16(a.ErrorCode)
err := pe.putString(a.ErrorMsg)
if err != nil {
return nil
return err
}
pe.putInt8(int8(a.Type))
err = pe.putString(a.Name)
if err != nil {
return nil
return err
}
return nil
}
Expand Down
6 changes: 3 additions & 3 deletions describe_configs_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,19 +308,19 @@ func (c *ConfigSynonym) encode(pe packetEncoder, version int16) (err error) {
func (c *ConfigSynonym) decode(pd packetDecoder, version int16) error {
name, err := pd.getString()
if err != nil {
return nil
return err
}
c.ConfigName = name

value, err := pd.getString()
if err != nil {
return nil
return err
}
c.ConfigValue = value

source, err := pd.getInt8()
if err != nil {
return nil
return err
}
c.Source = ConfigSource(source)
return nil
Expand Down
2 changes: 1 addition & 1 deletion logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "testing"
// logs of the given T passed from Test functions.
// and records the text in the error log.
//
// nolint

type testLogger struct {
t *testing.T
}
Expand Down

0 comments on commit 16fb95c

Please sign in to comment.