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

Function ExampleOption_ToPointer_some

option_example_test.go:195–201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193}
194
195func ExampleOption_ToPointer_some() {
196 some := Some(42)
197 result := some.ToPointer()
198
199 fmt.Println(*result)
200 // Output: 42
201}
202
203func ExampleOption_ToPointer_none() {
204 none := None[int]()

Callers

nothing calls this directly

Calls 2

SomeFunction · 0.85
ToPointerMethod · 0.80

Tested by

no test coverage detected