Skip to content

Commit

Permalink
util: Sort not considered on key type
Browse files Browse the repository at this point in the history
Signed-off-by: longquan0104 <[email protected]>
  • Loading branch information
longquan0104 committed May 10, 2023
1 parent 6caad7f commit 9dbc8b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func OrderedValuesChecksum(values chartutil.Values) string {
// of the order of the keys in the values file.
func SortMapSlice(ms goyaml.MapSlice) {
sort.Slice(ms, func(i, j int) bool {
return fmt.Sprintf("%T.%v", ms[i].Key, ms[i].Key) < fmt.Sprintf("%T.%v", ms[j].Key, ms[j].Key)
return fmt.Sprint(ms[i].Key) < fmt.Sprint(ms[j].Key)
})
for _, item := range ms {
if nestedMS, ok := item.Value.(goyaml.MapSlice); ok {
Expand Down

0 comments on commit 9dbc8b1

Please sign in to comment.