Style add golangci config (#670)

* style(lint): gofumpt

* style(lint): errcheck

* style(lint): revive

* style(lint): gocritic

* style(lint): forcetypeassert

* style(lint): add .golangci.yml

* oops
This commit is contained in:
Samuel Berthe
2025-09-20 01:37:51 +02:00
committed by GitHub
parent 76b76a7adb
commit 9c8308ffda
20 changed files with 182 additions and 82 deletions
+5 -3
View File
@@ -518,7 +518,9 @@ func TestTryWithErrorValue(t *testing.T) {
return errors.New("foo")
})
is.False(ok)
is.EqualError(err.(error), "foo")
e, isError := err.(error)
is.True(isError)
is.EqualError(e, "foo")
err, ok = TryWithErrorValue(func() error {
return nil
@@ -618,7 +620,7 @@ func TestAssert(t *testing.T) {
Assert(false, "user defined message")
})
//checks that the examples in `README.md` compile
// checks that the examples in `README.md` compile
{
age := 20
is.NotPanics(func() {
@@ -650,7 +652,7 @@ func TestAssertf(t *testing.T) {
Assertf(false, "user defined message %d %d", 1, 2)
})
//checks that the example in `README.md` compiles
// checks that the example in `README.md` compiles
{
age := 7
is.PanicsWithValue("assertion failed: user age must be >= 15, got 7", func() {