From 704bb5cb0e01fedf29029eb19d7849a2f37d34df Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 5 Mar 2025 11:45:51 +0100 Subject: [PATCH] use strings.Cut --- libs/patchwheel/parse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/patchwheel/parse.go b/libs/patchwheel/parse.go index 51d00e0d3..7e8b7b69d 100644 --- a/libs/patchwheel/parse.go +++ b/libs/patchwheel/parse.go @@ -18,7 +18,7 @@ type WheelInfo struct { // - if there is an existing part after + it is dropped // - append + to version func calculateNewVersion(info WheelInfo, mtime time.Time) (newVersion, newFilename string) { - baseVersion := strings.SplitN(info.Version, "+", 2)[0] + baseVersion, _, _ := strings.Cut(info.Version, "+") dt := strings.Replace(mtime.Format("20060102150405.00"), ".", "", 1) dt = strings.Replace(dt, ".", "", 1)