gitee.com/wgliang/goreporter@v0.0.0-20180902115603-df1b20f7c5d0/linters/golint/testdata/blank-import-lib_test.go (about) 1 // Test that blank imports in test packages are not flagged. 2 // OK 3 4 // Package foo ... 5 package foo 6 7 // These are essentially the same imports as in the "library" package, but 8 // these should not trigger the warning because this is a test. 9 10 import _ "encoding/json" 11 12 import ( 13 "fmt" 14 "testing" 15 16 _ "os" 17 18 _ "net/http" 19 _ "path" 20 ) 21 22 var ( 23 _ fmt.Stringer // for "fmt" 24 _ testing.T // for "testing" 25 )