From 64e7ad779ab62dc87238102b4456b2d560ce75b0 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Mon, 3 Mar 2025 16:19:54 +0100 Subject: [PATCH] refactor: Add context import and comment for version parsing in patchwheel.go --- libs/patchwheel/patchwheel.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/patchwheel/patchwheel.go b/libs/patchwheel/patchwheel.go index c4bdaa2f1..c5320f9ad 100644 --- a/libs/patchwheel/patchwheel.go +++ b/libs/patchwheel/patchwheel.go @@ -4,6 +4,7 @@ import ( "archive/zip" "bufio" "bytes" + "context" "crypto/sha256" "encoding/base64" "errors" @@ -56,6 +57,7 @@ func parseMetadata(content []byte) (version, distribution string, err error) { line := scanner.Text() if strings.HasPrefix(line, versionKey) { v := strings.TrimSpace(strings.TrimPrefix(line, versionKey)) + // AI TODO: return full version here; make caller do the parsing instead. // If there's a '+' in the version, strip it off. v = strings.SplitN(v, "+", 2)[0] version = v