Skip to content

Commit

Permalink
Fix package path
Browse files Browse the repository at this point in the history
  • Loading branch information
elwint committed Feb 12, 2024
1 parent 317f910 commit 9acddc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion find.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"go/parser"
"go/token"
"os"
"path/filepath"
"strings"
)

Expand All @@ -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
}
}
}
Expand Down

0 comments on commit 9acddc9

Please sign in to comment.