1
0
mirror of https://github.com/tmrts/go-patterns.git synced 2024-11-24 05:56:08 +03:00

creational/singleton: group variable declarations

This commit is contained in:
Tamer Tas 2017-01-13 09:34:48 +03:00
parent a523c5f6f3
commit dc42cd7206

View File

@ -9,9 +9,11 @@ package singleton
type singleton map[string]string type singleton map[string]string
var once sync.Once var (
once sync.Once
var instance singleton instance singleton
)
func New() singleton { func New() singleton {
once.Do(func() { once.Do(func() {