MCPcopy
hub / github.com/cli/cli / ExampleOption_IsNone

Function ExampleOption_IsNone

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

Source from the content-addressed store, hash-verified

75}
76
77func ExampleOption_IsNone() {
78 fmt.Println(o.Some(4).IsNone())
79 fmt.Println(o.None[int]().IsNone())
80
81 // Output:
82 // false
83 // true
84}
85
86func ExampleOption_Value() {
87 value, ok := o.Some(4).Value()

Callers

nothing calls this directly

Calls 2

PrintlnMethod · 0.80
IsNoneMethod · 0.80

Tested by

no test coverage detected