IsSome returns true if the [Option] is a [Some] variant.
()
| 109 | |
| 110 | // IsSome returns true if the [Option] is a [Some] variant. |
| 111 | func (o Option[T]) IsSome() bool { |
| 112 | return o.present |
| 113 | } |
| 114 | |
| 115 | // IsNone returns true if the [Option] is a [None] variant. |
| 116 | func (o Option[T]) IsNone() bool { |
no outgoing calls