Debian Codegraph @

_test/issue-1300.go

raw symbols SCIP
1 package main
2
3 const buflen = 512
4
5 type T struct {
6 buf []byte
7 }
8
9 func f(t *T) { *t = T{buf: make([]byte, 0, buflen)} }
10
11 func main() {
12 s := T{}
13 println(cap(s.buf))
14 f(&s)
15 println(cap(s.buf))
16 }
17
18 // Output:
19 // 0
20 // 512