Adopt testify assert.Nil
ProprietaryReplace if x != nil { t.Error(...) } with assert.Nil(t, x) and if x == nil { t.Error(...) } with assert.NotNil(t, x) from github.com/stretchr/testify/assert, for non-error operands. Error operands are handled by the NoError / Error recipes.
org. openrewrite. golang. testify. AdoptTestifyAssertNilmod run . --recipe= org. openrewrite. golang. testify. AdoptTestifyAssertNilInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.