Hacker News new | ask | show | jobs
by zaphar 4508 days ago
byteHandler is not a struct it's a byte slice. This is actually somewhat important since it highlights a nice feature of go where you can declare methods on any baseType by aliasing them to your own type.

There is no struct involved here and there doesn't need to be which is nice.

1 comments

I've found that when discussing Go, the terms `struct` and `type` are usually used interchangeably. Yes it's factually incorrect, but the message is at least intelligible.