DesignPattern
DesignPattern copied to clipboard
单例模式-go语言实现不是线程安全的
在代码文件中 Singleton/GO/singleton/singleton.go 多协程的场景下不是线程安全的,推荐使用 sync.Once 来实现。