Пример #1
0
func ExamplePoolNew() {
	p := pool.New(0)
	p.New = func() interface{} {
		return "World!"
	}
	fmt.Println(p.Get())
	// OutPut: World!
}
Пример #2
0
func ExamplePool() {
	p := pool.New(0)
	p.Put("Hello")
	fmt.Println(p.Get())
	// OutPut: Hello
}