3 ms·
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
by zaphar 13y 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.
- ihsw 13y agoI'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.