Skip to content

Commit

Permalink
refactor: call dependency.ID
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed Mar 12, 2024
1 parent dda7d7d commit 1057d92
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/dependency/parser/swift/swift/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (Parser) Parse(r xio.ReadSeekerAt) ([]types.Library, []types.Dependency, er
version := lo.Ternary(pin.State.Version != "", pin.State.Version, pin.State.Branch)

libs = append(libs, types.Library{
ID: packageID(name, version),
ID: dependency.ID(ftypes.Swift, name, version),
Name: name,
Version: version,
Locations: []types.Location{
Expand Down Expand Up @@ -92,7 +92,3 @@ func (p *Pin) UnmarshalJSONWithMetadata(node jfather.Node) error {
p.EndLine = node.Range().End.Line
return nil
}

func packageID(name, version string) string {
return dependency.ID(ftypes.Swift, name, version)
}

0 comments on commit 1057d92

Please sign in to comment.