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

Method sorted

pkg/compose/containers.go:192–197  ·  view source on GitHub ↗

sorted sorts containers in place by canonical name and returns the (same) slice.

()

Source from the content-addressed store, hash-verified

190
191// sorted sorts containers in place by canonical name and returns the (same) slice.
192func (containers Containers) sorted() Containers {
193 sort.Slice(containers, func(i, j int) bool {
194 return getCanonicalContainerName(containers[i]) < getCanonicalContainerName(containers[j])
195 })
196 return containers
197}

Callers 3

attachMethod · 0.80
resolveVolumeFromFunction · 0.80
resolveSharedNamespacesFunction · 0.80

Calls 1

Tested by

no test coverage detected