import "sync"code
type MySingleton struct {it
}import
var _init_ctx sync.Onceim
var _instance *MySingletonco
func New() * MySingleton {sync
_init_ctx.Do( func () { _instance = new(MySingleton) } ) return _instance
}let