func main() { configs := []*gsm.Config{ &gsm.Config{ Host: "127.0.0.1", Port: 1024, Data: []string{"TestA"}, }, &gsm.Config{ Host: "127.0.0.1", Port: 1025, Data: []string{"TestB"}, }, } gsm.Init(configs...) var ta TestA var tb TestB ta.Save() tb.Save() ta.Get() tb.Get() gsm.Close() }
func main() { gsm.Init(&gsm.Config{Host: "127.0.0.1", Port: 1024, Data: []string{"Test"}}) var t Test t.Save() t.Get() t.FindAll() t.Delete() gsm.Close() }