Pull request: all: fix lint and naming issues vol. 4
Merge in DNS/adguard-home from 2276-fix-lint-4 to master Updates #2276. Squashed commit of the following: commit 15d49184cd8ce1f8701bf3221e69418ca1778b36 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Dec 8 15:51:34 2020 +0300 util: fix naming commit 3b9a86a0feb8c6e0b167e6e23105e8137b0dda76 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Dec 8 15:41:10 2020 +0300 all: fix lint and naming issues vol. 4
This commit is contained in:
@@ -65,3 +65,9 @@ func (e *manyError) Unwrap() error {
|
||||
|
||||
return e.underlying[0]
|
||||
}
|
||||
|
||||
// wrapper is a copy of the hidden errors.wrapper interface for tests, linting,
|
||||
// etc.
|
||||
type wrapper interface {
|
||||
Unwrap() error
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ func TestError_Error(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestError_Unwrap(t *testing.T) {
|
||||
var _ wrapper = &manyError{}
|
||||
|
||||
const (
|
||||
errSimple = iota
|
||||
errWrapped
|
||||
|
||||
Reference in New Issue
Block a user