github.com/serversong/goreporter@v0.0.0-20200325104552-3cfaf44fd178/linters/staticcheck/testdata/checkStdlibUsageNilContext.go (about) 1 package pkg 2 3 import "context" 4 5 func fn1(ctx context.Context) {} 6 func fn2(x string, ctx context.Context) {} 7 8 func fn3() { 9 fn1(nil) // MATCH /do not pass a nil Context/ 10 fn1(context.TODO()) 11 fn2("", nil) 12 }