Glossary: Software Design Patterns in Go
sync.Once
Also written: once.Do
A Go standard-library type whose `Do` method runs a function the first time it's called and never again, even with several goroutines. It builds a singleton on first use.
Glossary: Software Design Patterns in Go
Also written: once.Do
A Go standard-library type whose `Do` method runs a function the first time it's called and never again, even with several goroutines. It builds a singleton on first use.