diff --git a/internal/manifest/flatten.go b/internal/manifest/flatten.go index 6f5857d7..5e1172e7 100644 --- a/internal/manifest/flatten.go +++ b/internal/manifest/flatten.go @@ -16,7 +16,6 @@ package manifest import ( "encoding/json" - "sort" "strings" "github.com/slackapi/slack-cli/internal/slackerror" @@ -69,13 +68,3 @@ func escapePathSegment(s string) string { s = strings.ReplaceAll(s, `.`, `\.`) return s } - -// SortedKeys returns the keys of a flat map in sorted order for deterministic output. -func SortedKeys(m map[string]any) []string { - keys := make([]string, 0, len(m)) - for k := range m { - keys = append(keys, k) - } - sort.Strings(keys) - return keys -} diff --git a/internal/manifest/flatten_test.go b/internal/manifest/flatten_test.go index cf1ddb2b..b69fae46 100644 --- a/internal/manifest/flatten_test.go +++ b/internal/manifest/flatten_test.go @@ -141,13 +141,3 @@ func Test_Flatten_DottedKeyRoundTrip(t *testing.T) { assert.Equal(t, "Lookup", round.Functions["slack.users.lookup"].Title) assert.Equal(t, "Lookup a user", round.Functions["slack.users.lookup"].Description) } - -func Test_SortedKeys(t *testing.T) { - m := map[string]any{ - "z.field": "val", - "a.field": "val", - "m.field": "val", - } - keys := SortedKeys(m) - assert.Equal(t, []string{"a.field", "m.field", "z.field"}, keys) -}