https://github.com/tarm/serial/blob/master/serial.go#L103
type StopBits byte
type Parity byte
type Config struct {
    Name        string
    Baud        int
    ReadTimeout time.Duration
    Size byte
    Parity Parity
    StopBits StopBits
}
I am trying to flag the command line and fill in the config struct but i can't figure out how to go from int or string to a single byte?
example size 7
Tried
mysize := "7"
mysize[0]
but then tarm/serial tells me invalid input error in the serial.Config
i, err := strconv.Atoi("7")
compiler complains that i can't do i.(byte)
The only way I can make it work is to hardcode size: 7 in the config struct.
 
     
    