WriteBool write bool with the tag.
(data bool, tag byte)
| 214 | |
| 215 | // WriteBool write bool with the tag. |
| 216 | func (b *Buffer) WriteBool(data bool, tag byte) error { |
| 217 | tmp := int8(0) |
| 218 | if data { |
| 219 | tmp = 1 |
| 220 | } |
| 221 | return b.WriteInt8(tmp, tag) |
| 222 | } |
| 223 | |
| 224 | // WriteInt16 write the int16 with the tag. |
| 225 | func (b *Buffer) WriteInt16(data int16, tag byte) error { |