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

Function ExampleSome

option_example_test.go:8–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6)
7
8func ExampleSome() {
9 some := Some(42)
10 result := some.OrElse(1234)
11
12 fmt.Println(result)
13 // Output: 42
14}
15
16func ExampleNone() {
17 none := None[int]()

Callers

nothing calls this directly

Calls 2

SomeFunction · 0.85
OrElseMethod · 0.45

Tested by

no test coverage detected