github.com/serversong/goreporter@v0.0.0-20200325104552-3cfaf44fd178/linters/simplecode/gotool/go16.go (about) 1 // +build go1.6 2 3 package gotool 4 5 import ( 6 "go/build" 7 "path/filepath" 8 "runtime" 9 ) 10 11 var gorootSrc = filepath.Join(runtime.GOROOT(), "src") 12 13 func shouldIgnoreImport(p *build.Package) bool { 14 return p == nil || len(p.InvalidGoFiles) == 0 15 }