func ExamplePoolNew() { p := pool.New(0) p.New = func() interface{} { return "World!" } fmt.Println(p.Get()) // OutPut: World! }
func ExamplePool() { p := pool.New(0) p.Put("Hello") fmt.Println(p.Get()) // OutPut: Hello }