MCPcopy Index your code
hub / github.com/devspace-sh/devspace / String

Method String

pkg/devspace/kubectl/selector/selector.go:83–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81}
82
83func (s Selector) String() string {
84 if len(s.ImageSelector) == 0 && len(s.LabelSelector) == 0 && s.Pod == "" {
85 return "everything selector"
86 }
87
88 strs := []string{}
89 if len(s.ImageSelector) > 0 {
90 strs = append(strs, "image selector: "+strings.Join(s.ImageSelector, ","))
91 }
92 if len(s.LabelSelector) > 0 {
93 if s.ContainerName != "" {
94 strs = append(strs, "label selector: "+s.LabelSelector+" - container: "+s.ContainerName)
95 } else {
96 strs = append(strs, "label selector: "+s.LabelSelector)
97 }
98 }
99 if s.Pod != "" {
100 strs = append(strs, "pod name: "+s.Pod)
101 }
102
103 return strings.Join(strs, ", ")
104}
105
106type FilterContainer func(p *corev1.Pod, c *corev1.Container) bool
107type SortContainers func(containers []*SelectedPodContainer, i, j int) bool

Callers 15

DeployMethod · 0.45
UpdateMethod · 0.45
SetPluginsFunction · 0.45
SetPluginCommandFunction · 0.45
WithCommandFlagsFunction · 0.45
handlerMethod · 0.45
ApplyConfigParameterMethod · 0.45
SelectSingleContainerMethod · 0.45
SelectSinglePodMethod · 0.45
selectSingleMethod · 0.45
selectSingleContainerMethod · 0.45
selectSinglePodMethod · 0.45

Calls

no outgoing calls

Tested by 2

checkFilesAndFoldersFunction · 0.36
TestUpgradeFunction · 0.36