MCPcopy
hub / github.com/helm/helm / Set

Method Set

pkg/cmd/flags.go:82–98  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

80}
81
82func (ws *waitValue) Set(s string) error {
83 switch s {
84 case string(kube.StatusWatcherStrategy), string(kube.LegacyStrategy), string(kube.HookOnlyStrategy):
85 *ws = waitValue(s)
86 return nil
87 case "true":
88 slog.Warn("--wait=true is deprecated (boolean value) and can be replaced with --wait=watcher")
89 *ws = waitValue(kube.StatusWatcherStrategy)
90 return nil
91 case "false":
92 slog.Warn("--wait=false is deprecated (boolean value) and can be replaced with --wait=hookOnly")
93 *ws = waitValue(kube.HookOnlyStrategy)
94 return nil
95 default:
96 return fmt.Errorf("invalid wait input %q. Valid inputs are %s, %s, and %s", s, kube.StatusWatcherStrategy, kube.HookOnlyStrategy, kube.LegacyStrategy)
97 }
98}
99
100func (ws *waitValue) Type() string {
101 return "WaitStrategy"

Callers 15

TestHTTPURLLoader_LoadFunction · 0.45
LoadMethod · 0.45
UpdateMethod · 0.45
ListMethod · 0.45
ListMethod · 0.45
createDummyResourceListFunction · 0.45
createDummyCRDListFunction · 0.45
fakeClientWithFunction · 0.45
filterSelectorMethod · 0.45
WriteTableMethod · 0.45

Calls 1

waitValueTypeAlias · 0.85

Tested by 15

TestHTTPURLLoader_LoadFunction · 0.36
ListMethod · 0.36
ListMethod · 0.36
createDummyResourceListFunction · 0.36
createDummyCRDListFunction · 0.36
fakeClientWithFunction · 0.36
TestSelectorsForObjectFunction · 0.36
newResponseFunction · 0.36