Skip to content
This repository was archived by the owner on May 9, 2021. It is now read-only.

Commit 738671d

Browse files
minizillastamblerre
authored andcommitted
lint: add Unwrap to common methods
Change-Id: Ia2f9aa6efeaff0d22a04af54340ccefdf0598f9a GitHub-Last-Rev: 354a283 GitHub-Pull-Request: #487 Reviewed-on: https://go-review.googlesource.com/c/lint/+/221610 Run-TryBot: Rebecca Stambler <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
1 parent 910be7a commit 738671d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lint.go

+1
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,7 @@ var commonMethods = map[string]bool{
839839
"ServeHTTP": true,
840840
"String": true,
841841
"Write": true,
842+
"Unwrap": true,
842843
}
843844

844845
// lintFuncDoc examines doc comments on functions and methods.

testdata/common-methods.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ func (T) String() string { return "" }
1414
func (T) ServeHTTP(w http.ResponseWriter, r *http.Request) {}
1515
func (T) Read(p []byte) (n int, err error) { return 0, nil }
1616
func (T) Write(p []byte) (n int, err error) { return 0, nil }
17+
func (T) Unwrap(err error) error { return nil }

0 commit comments

Comments
 (0)