diff options
Diffstat (limited to 'libgo/go/cmd/vet/method.go')
-rw-r--r-- | libgo/go/cmd/vet/method.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libgo/go/cmd/vet/method.go b/libgo/go/cmd/vet/method.go index b13ce2fcb56..5783278d2c2 100644 --- a/libgo/go/cmd/vet/method.go +++ b/libgo/go/cmd/vet/method.go @@ -166,9 +166,7 @@ func (f *File) matchParams(expect []string, actual []ast.Expr, prefix string) bo // Does this one type match? func (f *File) matchParamType(expect string, actual ast.Expr) bool { - if strings.HasPrefix(expect, "=") { - expect = expect[1:] - } + expect = strings.TrimPrefix(expect, "=") // Strip package name if we're in that package. if n := len(f.file.Name.Name); len(expect) > n && expect[:n] == f.file.Name.Name && expect[n] == '.' { expect = expect[n+1:] |