package v01 import ( "log" "mayhem-party/src/device/input/button" ) type message struct { T int64 U string Y string N string } func (msg message) buttons() []button.Button { buttons := make([]button.Button, len(msg.Y)+len(msg.N)) for i := range msg.Y { buttons[i] = button.Button{Char: msg.Y[i], Down: true} } for i := range msg.N { buttons[len(msg.Y)+i] = button.Button{Char: msg.N[i], Down: false} } if FlagDebug { log.Printf("%+v", msg) } return buttons }