Skip to content

Commit

Permalink
perf(protocol): append bool as byte instead of converting
Browse files Browse the repository at this point in the history
  • Loading branch information
HotPotatoC committed Nov 29, 2021
1 parent e6f4e4e commit 2a31bb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protocol/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ func MakeBool(b bool) []byte {
var bb []byte
bb = append(bb, Integer)
if b {
bb = strconv.AppendInt(bb, 1, 10)
bb = append(bb, byte('1'))
} else {
bb = strconv.AppendInt(bb, 0, 10)
bb = append(bb, byte('0'))
}
bb = append(bb, CRLF...)
return bb
Expand Down

0 comments on commit 2a31bb3

Please sign in to comment.