Skip to content

Commit

Permalink
refactor: don't check len(dependsOn)
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Nov 21, 2024
1 parent 2334f56 commit 29d73fb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pkg/dependency/parser/golang/mod/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,11 @@ func (p *Parser) Parse(r xio.ReadSeekerAt) ([]ftypes.Package, []ftypes.Dependenc
return pkg.ID, pkg.Relationship == ftypes.RelationshipDirect
})

if len(dependsOn) > 0 {
sort.Strings(dependsOn)
deps = append(deps, ftypes.Dependency{
ID: root.ID,
DependsOn: dependsOn,
})
}
sort.Strings(dependsOn)
deps = append(deps, ftypes.Dependency{
ID: root.ID,
DependsOn: dependsOn,
})

pkgs[root.Name] = root
}
Expand Down

0 comments on commit 29d73fb

Please sign in to comment.