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

Function ExampleOption_OrEmpty_some

option_example_test.go:179–185  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177}
178
179func ExampleOption_OrEmpty_some() {
180 some := Some(42)
181 result := some.OrEmpty()
182
183 fmt.Println(result)
184 // Output: 42
185}
186
187func ExampleOption_OrEmpty_none() {
188 none := None[int]()

Callers

nothing calls this directly

Calls 2

SomeFunction · 0.85
OrEmptyMethod · 0.45

Tested by

no test coverage detected