mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 12:32:21 +00:00
Update ch1-05-mem.md
This commit is contained in:
parent
058b248e44
commit
4932a53620
@ -96,7 +96,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Instance() *singleton {
|
func Instance() *singleton {
|
||||||
if atomic.LoadUInt32(&initialized) == 1 {
|
if atomic.LoadUint32(&initialized) == 1 {
|
||||||
return instance
|
return instance
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user