Skip to content

Commit

Permalink
remove now unused toSet() from template_funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
sseide committed Mar 23, 2022
1 parent baa0f48 commit dd8afeb
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions pkg/template/template_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,20 @@ func (s interfaceSet) Contains(value interface{}) bool {
}

func (s interfaceSet) SortedSet() []string {
var out []string
for k := range s {
out = append(out, k)
}
sort.Strings(out)
return out
}

func (s interfaceSet) toSet() []string {
var i []string
for k := range s {
i = append(i, k)
}
sort.Strings(i)
return i
}

func (s interfaceSet) MarshalYAML() (interface{}, error) {
return s.toSet(), nil
return s.SortedSet(), nil
}

func (s interfaceSet) MarshalJSON() ([]byte, error) {
return json.Marshal(s.toSet())
return json.Marshal(s.SortedSet())
}

type templateMap map[string]interface{}
Expand Down

0 comments on commit dd8afeb

Please sign in to comment.