MCPcopy
hub / github.com/samber/mo / ExampleOption_Get_some

Function ExampleOption_Get_some

option_example_test.go:125–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123}
124
125func ExampleOption_Get_some() {
126 some := Some(42)
127 result, ok := some.Get()
128
129 fmt.Println(result)
130 fmt.Println(ok)
131 // Output:
132 // 42
133 // true
134}
135
136func ExampleOption_Get_none() {
137 none := None[int]()

Callers

nothing calls this directly

Calls 2

SomeFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected