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() {