MCPcopy
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
131func ExampleResult_Error_ok() {
132 ok := Ok(42)
133 result := ok.Error()
134
135 fmt.Println(result)
136 // Output: <nil>
137}
138
139func ExampleResult_Error_err() {
140 ko := Err[int](err)

Callers

nothing calls this directly

Calls 2

OkFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected