We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1534d52 commit 427672eCopy full SHA for 427672e
module/go_mod/go.go
@@ -49,13 +49,21 @@ func (i *Inspector) InspectProject(ctx context.Context) error {
49
m.Name = f.Module.Mod.Path
50
}
51
52
+ var depM = make(map[[2]string]struct{})
53
for _, it := range f.Require {
54
if it == nil {
55
continue
56
57
+ depM[[2]string{it.Mod.Path, it.Mod.Version}] = struct{}{}
58
+ }
59
+ for _, it := range f.Replace {
60
+ delete(depM, [2]string{it.Old.Path, it.Old.Version})
61
+ depM[[2]string{it.New.Path, it.New.Version}] = struct{}{}
62
63
+ for it := range depM {
64
m.Dependencies = append(m.Dependencies, model.Dependency{
- Name: it.Mod.Path,
- Version: it.Mod.Version,
65
+ Name: it[0],
66
+ Version: it[1],
67
})
68
69
task.AddModule(m)
0 commit comments