Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

instead of this:

    t.Buf = []byte{}
you can just do:

    t.Buf = nil


Those are semantically different (one is nil and one is not) but neither allocates.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: