Debian Codegraph @

_test/type10.go

raw symbols SCIP
1 package main
2
3 import (
4 "compress/gzip"
5 "fmt"
6 "sync"
7 )
8
9 var gzipWriterPools [10]*sync.Pool = [10]*sync.Pool{}
10
11 func main() {
12 level := 9
13 gzipWriterPools[level] = &sync.Pool{
14 New: func() interface{} {
15 w, _ := gzip.NewWriterLevel(nil, level)
16 return w
17 },
18 }
19 gzw := gzipWriterPools[level].Get().(*gzip.Writer)
20 fmt.Printf("gzw: %T\n", gzw)
21 }
22
23 // Output:
24 // gzw: *gzip.Writer