Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/samber/mo
/ ExampleResult_Error_ok
Function
ExampleResult_Error_ok
result_example_test.go:131–137 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
129
}
130
131
func
ExampleResult_Error_ok() {
132
ok := Ok(42)
133
result := ok.Error()
134
135
fmt.Println(result)
136
// Output: <nil>
137
}
138
139
func
ExampleResult_Error_err() {
140
ko := Err[int](err)
Callers
nothing calls this directly
Calls
2
Ok
Function · 0.85
Error
Method · 0.80
Tested by
no test coverage detected