diff --git a/.golangci.yml b/.golangci.yml index 559054e..f505629 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -16,7 +16,7 @@ linters: - govet - stylecheck - staticcheck -# - goerr113 +# - err113 - unconvert - unparam - nakedret @@ -24,7 +24,6 @@ linters: - gosimple - gosec - ineffassign - - depguard - typecheck - misspell - bodyclose @@ -48,7 +47,7 @@ issues: - golint text: "should be" - linters: - - goerr113 + - err113 text: "do not define dynamic errors" - linters: - stylecheck diff --git a/mdbx/env_test.go b/mdbx/env_test.go index dd83ce9..8cf4ebf 100644 --- a/mdbx/env_test.go +++ b/mdbx/env_test.go @@ -559,7 +559,7 @@ func TestEnv_CloseDBI(t *testing.T) { return } - //nolint:goerr113 + //nolint:err113 if stat.Entries != numdb { t.Errorf("unexpected entries: %d (not %d)", stat.Entries, numdb) } diff --git a/mdbx/error.go b/mdbx/error.go index 9932bf4..8dacca3 100644 --- a/mdbx/error.go +++ b/mdbx/error.go @@ -128,12 +128,12 @@ func IsMapFull(err error) bool { // IsErrno returns true if err's errno is the given errno. func IsErrno(err error, errno Errno) bool { - return IsErrnoFn(err, func(err error) bool { return err == errno }) //nolint:goerr113 + return IsErrnoFn(err, func(err error) bool { return err == errno }) //nolint:err113 } // IsErrnoSys returns true if err's errno is the given errno. func IsErrnoSys(err error, errno syscall.Errno) bool { - return IsErrnoFn(err, func(err error) bool { return err == errno }) //nolint:goerr113 + return IsErrnoFn(err, func(err error) bool { return err == errno }) //nolint:err113 } // IsErrnoFn calls fn on the error underlying err and returns the result. If diff --git a/mdbx/error_test.go b/mdbx/error_test.go index 3372a5f..d380c12 100644 --- a/mdbx/error_test.go +++ b/mdbx/error_test.go @@ -36,12 +36,12 @@ func TestErrno(t *testing.T) { t.Errorf("errno(0) != nil: %#v", zeroerr) } syserr := _operrno("testop", int(syscall.EINVAL)) - //nolint:goerr113 + //nolint:err113 if syserr.(*OpError).Errno != syscall.EINVAL { // fails if error is Errno(syscall.EINVAL) t.Errorf("errno(syscall.EINVAL) != syscall.EINVAL: %#v", syserr) } mdberr := _operrno("testop", int(KeyExist)) - //nolint:goerr113 + //nolint:err113 if mdberr.(*OpError).Errno != KeyExist { t.Errorf("errno(ErrKeyExist) != ErrKeyExist: %#v", syserr) } diff --git a/mdbx/msgfunc.go b/mdbx/msgfunc.go index 93f8400..9c2a1fb 100644 --- a/mdbx/msgfunc.go +++ b/mdbx/msgfunc.go @@ -37,7 +37,7 @@ type msgfunc func(string) error // not contain pointers in their struct fields. See the following language // proposal which discusses the restrictions on passing pointers to C. // -// https://github.com/golang/proposal/blob/master/design/12416-cgo-pointers.md +// https://github.com/golang/proposal/blob/master/design/12416-cgo-pointers.md type msgctx uintptr type _msgctx struct { fn msgfunc