diff --git a/find.go b/find.go index e823f6b..22f6799 100644 --- a/find.go +++ b/find.go @@ -6,6 +6,7 @@ import ( "go/parser" "go/token" "os" + "path/filepath" "strings" ) @@ -26,7 +27,7 @@ func findFuzzFunc(packagePath, funcName string) (*ast.Package, string, *ast.Func } for _, decl := range file.Decls { if funcDecl, ok := decl.(*ast.FuncDecl); ok && funcDecl.Name.Name == funcName { - return pkg, fname, funcDecl + return pkg, filepath.Base(fname), funcDecl } } }