singleton_test.go

最后更新于:2022-04-02 04:48:09

~~~ package singleton import ( "testing" ) func TestSingleton(t *testing.T) { sin1 := GetSingleton() sin2 := GetSingleton() if sin1 != sin2 { t.Error("实例对象不一样") } } ~~~
';