MCPcopy Index your code
hub / github.com/docker/cli / namespaceFromFilters

Function namespaceFromFilters

cli/command/stack/client_test.go:224–232  ·  view source on GitHub ↗
(fltrs client.Filters)

Source from the content-addressed store, hash-verified

222}
223
224func namespaceFromFilters(fltrs client.Filters) string {
225 // FIXME(thaJeztah): more elegant way for this? Should we have a utility for this?
226 var label string
227 for fltr := range fltrs["label"] {
228 label = fltr
229 break
230 }
231 return strings.TrimPrefix(label, convert.LabelNamespace+"=")
232}
233
234func belongToNamespace(id, namespace string) bool {
235 return strings.HasPrefix(id, namespace+"_")

Callers 4

ServiceListMethod · 0.85
NetworkListMethod · 0.85
SecretListMethod · 0.85
ConfigListMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…