package
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Mar 8, 2025
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Elem[E any] struct {
}
Elem represents an optional value.
Empty returns an empty optional value.
Of returns an optional value with the given value.
IsEmpty returns true if the value is not present.
IsNotEmpty returns true if the value is present.
IsPresent returns true if the value is present.
func (o Elem[E]) MustGet() E
MustGet returns the value if present, otherwise panics.
MustGetf returns the value if present, otherwise panics with a custom message.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.