Skip to content

Commit 3dcf17d

Browse files
committed
feat: panic2error
1 parent ab2b573 commit 3dcf17d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lang/golang/parser/parser.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,8 @@ func (p *GoParser) getModuleFromPath(path string) (name string, dir string, rel
478478
func (p *GoParser) pkgPathFromABS(path string) PkgPath {
479479
mod, _, rel := p.getModuleFromPath(path)
480480
if mod == "" {
481-
panic("not found package from " + path)
481+
fmt.Fprintf(os.Stderr, "not found package from %s \n", path)
482+
return mod
482483
}
483484
if rel != "" && rel != "." {
484485
return mod + "/" + rel

0 commit comments

Comments
 (0)