diff --git a/creational/singleton.md b/creational/singleton.md index fa6c463..632cdf8 100644 --- a/creational/singleton.md +++ b/creational/singleton.md @@ -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() {