Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
38
· 1y ago · 0 comments
instead of this:
t.Buf = []byte{}
you can just do:
t.Buf = nil
Comments
[–]
rsc
1y ago
Those are semantically different (one is nil and one is not) but neither allocates.