1
0
Fork 0
mirror of https://github.com/tmrts/go-patterns.git synced 2025-04-02 20:56:12 +03:00

Update singleton.md

This commit is contained in:
Pramono Winata 2019-10-09 23:21:40 +07:00 committed by GitHub
parent 668ab73b62
commit 1498ff1751
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,7 @@ var (
)
func New() singleton {
if singleton == nil {
if instance == nil {
once.Do(func() {
instance = make(singleton)
})