package
Version:
v0.3.0
Opens a new window with list of versions in this module.
Published: Nov 7, 2022
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 20
Opens a new window with list of known importers.
Documentation
¶
Package opt provides utilities for optional types.
type T[D any] struct {
Specified bool
Value D
}
T represents an optional type.
func Unspecified[D any]() T[D]
Unspecified returns an unspecified value of the generic type.
func V[D any](value D) T[D]
V returns a specified value of the generic type.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.