(w io.Writer, data uint8)
| 203 | } |
| 204 | |
| 205 | func WriteUint8ToByte(w io.Writer, data uint8) error { |
| 206 | bb := make([]byte, 8) |
| 207 | bb[0] = byte(data) |
| 208 | _, err := w.Write(bb[:1]) |
| 209 | if err != nil { |
| 210 | return err |
| 211 | } |
| 212 | |
| 213 | return nil |
| 214 | } |
| 215 | |
| 216 | func WriteUint16ToByte(w io.Writer, data uint16, bigEndian bool) error { |
| 217 | var bb []byte |
no test coverage detected