Fix lint warnings.
This commit was merged in pull request #11.
This commit is contained in:
@@ -37,15 +37,15 @@ func (b *boolean) unmarshal(byteStream io.Reader) {
|
||||
log.Warn("Unmarshal of boolean is not implemented yet")
|
||||
}
|
||||
|
||||
func (e *boolean) marshal() []byte {
|
||||
l := 5 + len(e.name)
|
||||
b := make([]byte, 0, l)
|
||||
buf := bytes.NewBuffer(b)
|
||||
func (b *boolean) marshal() []byte {
|
||||
l := 5 + len(b.name)
|
||||
ba := make([]byte, 0, l)
|
||||
buf := bytes.NewBuffer(ba)
|
||||
buf.WriteByte(byte(booleanValueTag))
|
||||
binary.Write(buf, binary.BigEndian, uint16(len(e.name)))
|
||||
buf.WriteString(e.name)
|
||||
binary.Write(buf, binary.BigEndian, uint16(len(b.name)))
|
||||
buf.WriteString(b.name)
|
||||
binary.Write(buf, binary.BigEndian, uint16(1))
|
||||
if e.value {
|
||||
if b.value {
|
||||
buf.WriteByte(byte(1))
|
||||
} else {
|
||||
buf.WriteByte(byte(0))
|
||||
@@ -53,7 +53,7 @@ func (e *boolean) marshal() []byte {
|
||||
return buf.Bytes()
|
||||
}
|
||||
|
||||
func (e *boolean) size() int {
|
||||
l := 5 + len(e.name)
|
||||
func (b *boolean) size() int {
|
||||
l := 5 + len(b.name)
|
||||
return l
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user