Debian Codegraph @

_test/method24.go

raw symbols SCIP
1 package main
2
3 import (
4 "fmt"
5 "sync"
6 )
7
8 type Pool struct {
9 p *sync.Pool
10 }
11
12 func (p Pool) Get() *Buffer { return &Buffer{} }
13
14 func NewPool() Pool { return Pool{} }
15
16 type Buffer struct {
17 bs []byte
18 pool Pool
19 }
20
21 var (
22 _pool = NewPool()
23 Get = _pool.Get
24 )
25
26 func main() {
27 fmt.Println(_pool)
28 fmt.Println(Get())
29 }
30
31 // Output:
32 // {<nil>}
33 // &{[] {<nil>}}