Closed aklinkert closed 4 years ago
Oooh, oopsie. I missed that one.
Could you rename GetOpCode()
to OpCode()
to be more idiomatic?
I wish I could have named the method OpCode
, but that's already the name of the field. :(
Ah, too bad. Thanks!
In jsimonetti/go-artnet#18 @h3ndrk introduced node OpCode callbacks, but unfortunatelly this broke the only packet which behaves completely different, which is ArtPollReply. And thus broke the controller logic.
I decided to add a method to the ArtNetPacket interface because we already have the (well tested) logic of decoding the OpCode inside of the packets validate method.