Skip to content

Commit

Permalink
gop.GenDepMods: support gop.mod - register
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Jun 18, 2022
1 parent e68fa9e commit 7ea32db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gendeps.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ import (
func GenDepMods(mod *gopmod.Module, dir string, recursively bool) (ret map[string]struct{}, err error) {
modBase := mod.Path()
ret = make(map[string]struct{})
for _, r := range mod.Register {
ret[r.ClassfileMod] = struct{}{}
}
err = HandleDeps(mod, dir, recursively, func(pkgPath string) {
modPath, _ := modfetch.Split(pkgPath, modBase)
if modPath != "" && modPath != modBase {
Expand Down

0 comments on commit 7ea32db

Please sign in to comment.