Registry / utility / markbates-oncer

markbates-oncer

JSON →
library1.0.0gogounverified

Package oncer provides a mechanism to execute a function only once.

go get github.com/markbates/oncer
INSTALL
IMPORT
SIG · MARKBATES-ONCER
M
markbates-oncer
utilitygov1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

oncer
github.com/markbates/oncer

Executes a function only once based on a key.

package main import ( "fmt" "github.com/markbates/oncer" ) func main() { oncer.Do("mykey", func() { fmt.Println("This runs only once") }) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
markbates-oncer — go get markbates-oncer · libregistry