MCPcopy
hub / github.com/derailed/k9s / String

Method String

internal/view/cmd/args.go:83–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81}
82
83func (a args) String() string {
84 ss := make([]string, 0, len(a))
85 kk := maps.Keys(a)
86 for _, k := range slices.Sorted(kk) {
87 v := a[k]
88 switch k {
89 case labelKey:
90 v = "'" + v + "'"
91 case filterKey:
92 v = filterFlag + v
93 case contextKey:
94 v = contextFlag + v
95 }
96 ss = append(ss, v)
97 }
98
99 return strings.Join(ss, " ")
100}
101
102func (a args) hasFilters() bool {
103 _, fok := a[filterKey]

Callers 15

InitMethod · 0.45
TestLogAnsiFunction · 0.45
switchNsMethod · 0.45
ShowDrainFunction · 0.45
gotoCmdMethod · 0.45
gotoCmdMethod · 0.45
StartMethod · 0.45
InitMethod · 0.45
gotoCmdMethod · 0.45
styleTitleMethod · 0.45
applyTemplateFunction · 0.45
SetLabelSelectorMethod · 0.45

Calls 1

KeysMethod · 0.80

Tested by 5

TestLogAnsiFunction · 0.36
initFunction · 0.36
Test_viewMetaForFunction · 0.36
TestLabelCmdFunction · 0.36
Test_grokLabelsFunction · 0.36