github.com/songshiyun/revive@v1.1.5-0.20220323112655-f8433a19b3c5/testdata/unhandled-error.go (about) 1 package fixtures 2 3 import ( 4 "fmt" 5 "os" 6 ) 7 8 func unhandledError1(a int) (int, error) { 9 return a, nil 10 } 11 12 func unhandledError2() error { 13 _, err := unhandledError1(1) 14 unhandledError1(1) // MATCH /Unhandled error in call to function unhandledError1/ 15 fmt.Fprintf(nil, "") // MATCH /Unhandled error in call to function fmt.Fprintf/ 16 os.Chdir("..") // MATCH /Unhandled error in call to function os.Chdir/ 17 _ = os.Chdir("..") 18 return err 19 }