Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
quinna-h committed Nov 20, 2024
1 parent 85b6bcb commit a839ae2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions latest_major_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ func main() {

latestMajor := make(map[string]string)

versionRegex := regexp.MustCompile(`^(?P<module>.+?)/v(\d+)$`) // Match on versions with /v{major}
// Match on versions with /v{major}
versionRegex := regexp.MustCompile(`^(?P<module>.+?)/v(\d+)$`)

// Iterate over the required modules
for _, req := range modFile.Require {
Expand All @@ -87,10 +88,6 @@ func main() {
version := req.Mod.Version
fmt.Printf("Parsed version: %s\n", version)

// version := req.Mod.Version

// match := versionRegex.FindStringSubmatch(module)
// fmt.Printf(" match: %s\n", match)

if match := versionRegex.FindStringSubmatch(module); match != nil {
url := match[1] // base module URL (e.g., github.com/foo)
Expand Down

0 comments on commit a839ae2

Please sign in to comment.