From e992581fb77f5b2d67329c1ca2c77c1eecce65a7 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Thu, 4 Feb 2021 19:46:52 +0100 Subject: [PATCH] tagSet.String() shows the encoded form of all tags (#1448) It does not make sense to show a list of tags while key/value are not encoded. e.g. key==val, you don't know if '=' belongs to the key or to val --- pkg/tags/tags.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/tags/tags.go b/pkg/tags/tags.go index 65ba38b102..d7c65af5a0 100644 --- a/pkg/tags/tags.go +++ b/pkg/tags/tags.go @@ -136,12 +136,11 @@ type tagSet struct { } func (tags tagSet) String() string { - s := []string{} + vals := make(url.Values) for key, value := range tags.tagMap { - s = append(s, key+"="+value) + vals.Set(key, value) } - - return strings.Join(s, "&") + return vals.Encode() } func (tags *tagSet) remove(key string) {