MCPcopy Create free account
hub / github.com/cli/cli / Value

Method Value

pkg/option/option.go:122–124  ·  view source on GitHub ↗

Value returns the underlying value and true for a [Some] variant, or the zero value and false for a [None] variant.

()

Source from the content-addressed store, hash-verified

120// Value returns the underlying value and true for a [Some] variant, or the
121// zero value and false for a [None] variant.
122func (o Option[T]) Value() (T, bool) {
123 return o.value, o.present
124}
125
126// Expect returns the underlying value for a [Some] variant, or panics with the
127// provided message for a [None] variant.

Callers 15

operationVariablesFunction · 0.80
conditionFunction · 0.80
argumentsMethod · 0.80
pickStatusFunction · 0.80
directiveConditionFunction · 0.80
successStatusFunction · 0.80
newProxyFunction · 0.80
exportDataMethod · 0.80
NewCmdCloseFunction · 0.80
closeRunFunction · 0.80

Calls

no outgoing calls

Tested by 6

ExampleOption_ValueFunction · 0.64
TestSomeValueFunction · 0.64
TestNoneValueFunction · 0.64
sharedCmdsFunction · 0.64