Skip to content

Commit

Permalink
Merge pull request goplus#1292 from xushiwei/cls
Browse files Browse the repository at this point in the history
gop.GenDepMods: support gop.mod - register
  • Loading branch information
xushiwei committed Jun 18, 2022
2 parents 8765218 + 7ea32db commit d24fb28
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 d24fb28

Please sign in to comment.