MCPcopy
hub / github.com/cli/cli / Set

Method Set

pkg/cmdutil/flags.go:132–138  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

130}
131
132func (e *enumValue) Set(value string) error {
133 if !isIncluded(value, e.options) {
134 return fmt.Errorf("valid values are %s", formatValuesForUsageDocs(e.options))
135 }
136 *e.string = value
137 return nil
138}
139
140func (e *enumValue) String() string {
141 return *e.string

Callers

nothing calls this directly

Calls 3

formatValuesForUsageDocsFunction · 0.85
isIncludedFunction · 0.70
ErrorfMethod · 0.65

Tested by

no test coverage detected