Skip to content

Commit

Permalink
tagSet.String() shows the encoded form of all tags (#1448)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vadmeste authored Feb 4, 2021
1 parent 546cb78 commit e992581
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/tags/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e992581

Please sign in to comment.