Skip to content

Commit

Permalink
lint 💄
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Aug 18, 2024
1 parent 38e0245 commit f3ee53b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
// Play: https://go.dev/play/p/vPyh51XpCBt
func Validate(ok bool, format string, args ...any) error {
if !ok {
return fmt.Errorf(fmt.Sprintf(format, args...))
return fmt.Errorf(format, args...)
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion type_manipulation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestIsNil(t *testing.T) {

var ifaceWithNilValue any = (*string)(nil)

Check failure on line 28 in type_manipulation_test.go

View workflow job for this annotation

GitHub Actions / lint

SA4023(related information): the lhs of the comparison gets its value from here and has a concrete type (staticcheck)
is.True(IsNil(ifaceWithNilValue))
is.False(ifaceWithNilValue == nil) // nolint:staticcheck
is.False(ifaceWithNilValue == nil) //nolint:staticcheck
}

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

0 comments on commit f3ee53b

Please sign in to comment.