MCPcopy
hub / github.com/docker/compose / sortedKeys

Function sortedKeys

pkg/compose/reconcile.go:844–851  ·  view source on GitHub ↗

sortedKeys returns the keys of a map sorted alphabetically. This ensures deterministic iteration order for reproducible plan output in tests.

(m map[string]V)

Source from the content-addressed store, hash-verified

842// sortedKeys returns the keys of a map sorted alphabetically.
843// This ensures deterministic iteration order for reproducible plan output in tests.
844func sortedKeys[V any](m map[string]V) []string {
845 keys := make([]string, 0, len(m))
846 for k := range m {
847 keys = append(keys, k)
848 }
849 sort.Strings(keys)
850 return keys
851}

Callers 7

reconcileNetworksMethod · 0.85
reconcileVolumesMethod · 0.85
servicesUsingNetworkMethod · 0.85
servicesUsingVolumeMethod · 0.85
hasNetworkMismatchMethod · 0.85
infrastructureDepsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected