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:
parent
668ab73b62
commit
1498ff1751
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ var (
|
|||
)
|
||||
|
||||
func New() singleton {
|
||||
if singleton == nil {
|
||||
if instance == nil {
|
||||
once.Do(func() {
|
||||
instance = make(singleton)
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue