diff --git a/creational/singleton.md b/creational/singleton.md index 5c3407b..3904f9a 100644 --- a/creational/singleton.md +++ b/creational/singleton.md @@ -16,7 +16,7 @@ var ( ) func New() singleton { - if singleton == nil { + if instance == nil { once.Do(func() { instance = make(singleton) })