Of returns a pointer to the value `v`. Play: https://go.dev/play/p/HFd70x4DrMj
(v T)
| 11 | // Of returns a pointer to the value `v`. |
| 12 | // Play: https://go.dev/play/p/HFd70x4DrMj |
| 13 | func Of[T any](v T) *T { |
| 14 | if IsNil(v) { |
| 15 | return nil |
| 16 | } |
| 17 | return &v |
| 18 | } |
| 19 | |
| 20 | // Unwrap returns the value from the pointer. |
| 21 | // |