Chore: Use strings.ReplaceAll and preallocate containers (#58483)

This commit is contained in:
Sasha Melentyev
2022-11-09 17:17:09 +01:00
committed by GitHub
parent 2dfe0a4060
commit febcaeff3a
6 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ func LinuxPackageVersion(v string, buildID string) (string, string) {
}
func shortenBuildID(buildID string) string {
buildID = strings.Replace(buildID, "-", "", -1)
buildID = strings.ReplaceAll(buildID, "-", "")
if len(buildID) < 9 {
return buildID
}