Go Once

From NovaOrdis Knowledge Base
Revision as of 19:55, 5 September 2023 by Ovidiu (talk | contribs) (Created page with "=Internal= * The <tt>sync</tt> Package * Goroutines | Synchronization =Overview= <code>Once</code> is a Go synchr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Overview

Once is a Go synchronization construct that is used when a piece of code must be executed only once. This is a useful idiom in initialization.