github.com/andy2046/gopie@v0.7.0/pkg/singleton/singleton_test.go (about) 1 package singleton 2 3 import ( 4 "testing" 5 ) 6 7 func TestSingleton(t *testing.T) { 8 s := New() 9 s.Values["this"] = "that" 10 11 s2 := New() 12 if s2.Values["this"] != "that" { 13 t.Fatal("wrong singleton implementation") 14 } 15 }