MCPcopy
hub / github.com/cli/cli / ExampleOption_Value

Function ExampleOption_Value

pkg/option/option_test.go:86–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84}
85
86func ExampleOption_Value() {
87 value, ok := o.Some(4).Value()
88 fmt.Println(value)
89 fmt.Println(ok)
90
91 // Output:
92 // 4
93 // true
94}
95
96func ExampleOption_Expect() {
97 fmt.Println(o.Some(4).Expect("oops"))

Callers

nothing calls this directly

Calls 2

ValueMethod · 0.80
PrintlnMethod · 0.80

Tested by

no test coverage detected