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

Function ExampleOption_some

option_example_test.go:61–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59}
60
61func ExampleOption_some() {
62 some := Some(42)
63 result := some.OrElse(1234)
64
65 fmt.Println(result)
66 // Output: 42
67}
68
69func ExampleOption_none() {
70 none := None[int]()

Callers

nothing calls this directly

Calls 2

SomeFunction · 0.85
OrElseMethod · 0.45

Tested by

no test coverage detected