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

Method Set

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

Source from the content-addressed store, hash-verified

151}
152
153func (e *enumMultiValue) Set(value string) error {
154 items := strings.Split(value, ",")
155 for _, item := range items {
156 if !isIncluded(item, e.options) {
157 return fmt.Errorf("valid values are %s", formatValuesForUsageDocs(e.options))
158 }
159 }
160 *e.value = append(*e.value, items...)
161 return nil
162}
163
164func (e *enumMultiValue) String() string {
165 if len(*e.value) == 0 {

Callers

nothing calls this directly

Calls 3

formatValuesForUsageDocsFunction · 0.85
isIncludedFunction · 0.70
ErrorfMethod · 0.65

Tested by

no test coverage detected