Skip to content

Commit

Permalink
remove old comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bhamail committed Jun 2, 2022
1 parent 93517cd commit 9c5e4c2
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions packages/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package packages

import (
"strings"

"fmt"
"github.com/sonatype-nexus-community/nancy/types"
"strings"
)

type Mod struct {
Expand All @@ -32,8 +32,14 @@ func (m Mod) ExtractPurlsFromManifest() (purls []string) {
if len(s.Version) > 0 { // There must be a version we can use
// OSS Index no likey v before version, IQ does though, comment left so I will never forget.
// go-sona-types library now takes care of querying both ossi and iq with reformatted purls as needed (to v or not to v).
version := strings.Replace(s.Version, "v", "", -1)
version = strings.Replace(version, "+incompatible", "", -1)
//version := strings.Replace(s.Version, "v", "", -1)
//version = strings.Replace(version, "+incompatible", "", -1)

version := strings.Replace(s.Version, "+incompatible", "", -1)

fmt.Printf("original version: %s\n", s.Version)
fmt.Printf("fixed version: %s\n", version)

var purl = "pkg:" + convertGopkgNameToPurl(s.Name) + "@" + version
purls = append(purls, purl)
}
Expand All @@ -49,11 +55,9 @@ func removeDuplicates(purls []string) (dedupedPurls []string) {

for _, v := range purls {
if encountered[v] {
// TODO: restore logging
// logLady.WithField("dep", v).Debug("Found duplicate dependency, eliminating it")
// Found duplicate dependency, eliminating it
} else {
// TODO: restore logging
// logLady.WithField("dep", v).Debug("Unique dependency, adding it")
// Unique dependency, adding it")
encountered[v] = true
dedupedPurls = append(dedupedPurls, v)
}
Expand Down

0 comments on commit 9c5e4c2

Please sign in to comment.