Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
61
func
ExampleOption_some() {
62
some := Some(42)
63
result := some.OrElse(1234)
64
65
fmt.Println(result)
66
// Output: 42
67
}
68
69
func
ExampleOption_none() {
70
none := None[int]()
Callers
nothing calls this directly
Calls
2
Some
Function · 0.85
OrElse
Method · 0.45
Tested by
no test coverage detected