Skip to content

Commit

Permalink
ineffassign
Browse files Browse the repository at this point in the history
  • Loading branch information
phm07 committed Aug 12, 2024
1 parent b309b14 commit 5cf21ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ linters:
- gosec
# - gosimple
- govet
# - ineffassign
- ineffassign
- misspell
- revive
- rowserrcheck
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/server/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var IPCmd = base.Cmd{
return cmd
},
Run: func(s state.State, cmd *cobra.Command, args []string) error {
ipv6, err := cmd.Flags().GetBool("ipv6")
ipv6, _ := cmd.Flags().GetBool("ipv6")
idOrName := args[0]
server, _, err := s.Client().Server().Get(s, idOrName)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions internal/cmd/util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,10 @@ func TestParseBoolLenient(t *testing.T) {
assert.False(t, b)
b, err = util.ParseBoolLenient("invalid")
assert.EqualError(t, err, "invalid boolean value: invalid")
assert.False(t, b)
b, err = util.ParseBoolLenient("")
assert.EqualError(t, err, "invalid boolean value: ")
assert.False(t, b)
}

func TestBoolFromAny(t *testing.T) {
Expand Down

0 comments on commit 5cf21ef

Please sign in to comment.