lint: add Unwrap to common methods
Change-Id: Ia2f9aa6efeaff0d22a04af54340ccefdf0598f9a
GitHub-Last-Rev: 354a28341b0ec697300e0ce9160c7709b29b1981
GitHub-Pull-Request: golang/lint#487
Reviewed-on: https://go-review.googlesource.com/c/lint/+/221610
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/lint.go b/lint.go
index 532a75a..7d813e0 100644
--- a/lint.go
+++ b/lint.go
@@ -839,6 +839,7 @@
"ServeHTTP": true,
"String": true,
"Write": true,
+ "Unwrap": true,
}
// lintFuncDoc examines doc comments on functions and methods.
diff --git a/testdata/common-methods.go b/testdata/common-methods.go
index c0bb136..e2377bd 100644
--- a/testdata/common-methods.go
+++ b/testdata/common-methods.go
@@ -14,3 +14,4 @@
func (T) ServeHTTP(w http.ResponseWriter, r *http.Request) {}
func (T) Read(p []byte) (n int, err error) { return 0, nil }
func (T) Write(p []byte) (n int, err error) { return 0, nil }
+func (T) Unwrap(err error) error { return nil }