MCPcopy Create free account
hub / github.com/compozy/agh / sortedReflectMapKeys

Function sortedReflectMapKeys

internal/cli/config.go:1013–1019  ·  view source on GitHub ↗
(value reflect.Value)

Source from the content-addressed store, hash-verified

1011}
1012
1013func sortedReflectMapKeys(value reflect.Value) []reflect.Value {
1014 keys := value.MapKeys()
1015 sort.Slice(keys, func(i int, j int) bool {
1016 return fmt.Sprint(keys[i].Interface()) < fmt.Sprint(keys[j].Interface())
1017 })
1018 return keys
1019}
1020
1021func configSequenceNode(value reflect.Value, fieldName string) (any, bool) {
1022 items := make([]any, 0, value.Len())

Callers 1

configMapNodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected