package
Version:
v0.0.0-...-181a21d
Opens a new window with list of versions in this module.
Published: Jun 25, 2024
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func GetIns() *singleton3
func GetIns1Or() *singleton1
func GetIns2Or() *singleton2
func GetInsOr() *singleton
使用once.Do可以确保 ins 实例全局只被创建一次,
once.Do 函数还可以确保当同时有多个创建动作时,只有一个创建动作在被执行,
内部也是 mutex.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.