Skip to content

Commit b88589f

Browse files
authored
Merge pull request #197 from mcha-forks/main
Trim potential GOEXPERIMENT flag in buildinfo
2 parents 7000556 + 8259398 commit b88589f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

internal/goutil/goutil.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ func (p *Package) IsAlreadyUpToDate() bool {
131131
}
132132

133133
return versionUpToDate(
134-
strings.TrimLeft(p.Version.Current, "v"),
135-
strings.TrimLeft(p.Version.Latest, "v"),
134+
strings.TrimPrefix(p.Version.Current, "v"),
135+
strings.TrimPrefix(p.Version.Latest, "v"),
136136
) && versionUpToDate(
137-
strings.TrimLeft(p.GoVersion.Current, "go"),
138-
strings.TrimLeft(p.GoVersion.Latest, "go"),
137+
strings.TrimPrefix(p.GoVersion.Current, "go"),
138+
strings.TrimPrefix(p.GoVersion.Latest, "go"),
139139
)
140140
}
141141

@@ -367,7 +367,7 @@ func GetPackageInformation(binList []string) []Package {
367367
GoVersion: NewVersion(),
368368
}
369369
pkg.Version.Current = info.Main.Version
370-
pkg.GoVersion.Current = info.GoVersion
370+
pkg.GoVersion.Current, _, _ = strings.Cut(info.GoVersion, " ")
371371
pkg.GoVersion.Latest = goVer
372372
pkgs = append(pkgs, pkg)
373373
}

0 commit comments

Comments
 (0)