1
0

Updated staticcheck

This commit is contained in:
kolaente
2019-04-22 12:59:42 +02:00
parent 5dc1fd0f86
commit 99f83542f6
34 changed files with 6144 additions and 2537 deletions

View File

@ -12,6 +12,7 @@ import (
"sort"
"strings"
"honnef.co/go/tools/lint"
"honnef.co/go/tools/ssa"
)
@ -291,7 +292,7 @@ func BuildGraph(f *ssa.Function) *Graph {
case *ssa.Call:
if static := ins.Common().StaticCallee(); static != nil {
if fn, ok := static.Object().(*types.Func); ok {
switch fn.FullName() {
switch lint.FuncName(fn) {
case "bytes.Index", "bytes.IndexAny", "bytes.IndexByte",
"bytes.IndexFunc", "bytes.IndexRune", "bytes.LastIndex",
"bytes.LastIndexAny", "bytes.LastIndexByte", "bytes.LastIndexFunc",