Skip to content

Commit

Permalink
doc: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hhow09 committed May 20, 2024
1 parent d96fe6c commit 7780f44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ func getPkgID(pattern string) (string, error) {
if len(pkgs) > 1 {
return "", errUnsupportMultiplePkgs

Check warning on line 165 in main.go

View check run for this annotation

Codecov / codecov/patch

main.go#L164-L165

Added lines #L164 - L165 were not covered by tests
}
// when no go file in the package, the package name will be empty
// this prevent the missing field upfront.
if pkgs[0].Name == "" {
return "", fmt.Errorf("%w on %s", errMissingPackageName, pattern)

Check warning on line 170 in main.go

View check run for this annotation

Codecov / codecov/patch

main.go#L169-L170

Added lines #L169 - L170 were not covered by tests
}
Expand Down

0 comments on commit 7780f44

Please sign in to comment.