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

Function ExampleResult_IsError_ok

result_example_test.go:115–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113}
114
115func ExampleResult_IsError_ok() {
116 ok := Ok(42)
117 result := ok.IsError()
118
119 fmt.Println(result)
120 // Output: false
121}
122
123func ExampleResult_IsError_err() {
124 ko := Err[int](err)

Callers

nothing calls this directly

Calls 2

OkFunction · 0.85
IsErrorMethod · 0.80

Tested by

no test coverage detected