Improved catching up and refactored

This commit is contained in:
obscuren
2014-09-15 15:42:12 +02:00
parent 2f614900e8
commit 33a0dec8a1
11 changed files with 129 additions and 106 deletions

View File

@ -124,6 +124,8 @@ func Encode(object interface{}) []byte {
} else {
buff.Write(Encode(t.Bytes()))
}
case Bytes:
buff.Write(Encode([]byte(t)))
case []byte:
if len(t) == 1 && t[0] <= 0x7f {
buff.Write(t)