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:
parent
a523c5f6f3
commit
dc42cd7206
@ -9,9 +9,11 @@ package singleton
|
||||
|
||||
type singleton map[string]string
|
||||
|
||||
var once sync.Once
|
||||
var (
|
||||
once sync.Once
|
||||
|
||||
var instance singleton
|
||||
instance singleton
|
||||
)
|
||||
|
||||
func New() singleton {
|
||||
once.Do(func() {
|
||||
|
Loading…
Reference in New Issue
Block a user