refactor(worker): iterate node label pairs with SplitSeq (#11806)

Signed-off-by: ginavalent <ginavalent@outlook.com>
This commit is contained in:
ginavalent authored and GitHub committed 2026-08-31 18:05:44 +02:00
1 parent 69a5b54c0a
commit 04bca750d0
1 file changed
+1 -1
+1 -1
View File
@@ -10,7 +10,7 @@ func ParseNodeLabels(input string) map[string]string {
if input == "" {
return labels
}
for _, pair := range strings.Split(input, ",") {
for pair := range strings.SplitSeq(input, ",") {
pair = strings.TrimSpace(pair)
if k, v, ok := strings.Cut(pair, "="); ok {
labels[strings.TrimSpace(k)] = strings.TrimSpace(v)