HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by 38 | Hacker News Reader
Full thread
38
·
instead of this:
t.Buf = []byte{}
you can just do:
t.Buf = nil
View on HN
rsc
·
Those are semantically different (one is nil and one is not) but neither allocates.
Reply on news.ycombinator.com