package
Version:
v0.17.0
Opens a new window with list of versions in this module.
Published: Nov 19, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 3
Opens a new window with list of known importers.
Documentation
¶
Package once provides a way to call a function exactly once (memoisation).
type Handle[T any] struct {
}
Once returns a new Handle[T] that calls f exactly once.
The returned Handle[T] is safe for concurrent use.
If f returns an error, the error will be returned by Get on all subsequent calls.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.