MCPcopy
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

exportDataMethod · 0.80
NewCmdCloseFunction · 0.80
closeRunFunction · 0.80
NewCmdUnpinFunction · 0.80
NewCmdDevelopFunction · 0.80
NewCmdReopenFunction · 0.80
NewCmdDeleteFunction · 0.80
NewCmdPinFunction · 0.80
NewCmdViewFunction · 0.80
setCommonOptionsMethod · 0.80
NewCmdTransferFunction · 0.80

Calls

no outgoing calls

Tested by 5

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