MCPcopy Index your code
hub / github.com/cli/cli / ExampleOption_IsSome

Function ExampleOption_IsSome

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

Source from the content-addressed store, hash-verified

66}
67
68func ExampleOption_IsSome() {
69 fmt.Println(o.Some(4).IsSome())
70 fmt.Println(o.None[int]().IsSome())
71
72 // Output:
73 // true
74 // false
75}
76
77func ExampleOption_IsNone() {
78 fmt.Println(o.Some(4).IsNone())

Callers

nothing calls this directly

Calls 2

PrintlnMethod · 0.80
IsSomeMethod · 0.80

Tested by

no test coverage detected