Call better suited strconv.AppendInt when converting keys to byte slices.

This commit is contained in:
Sascha L. Teichmann 2017-02-25 00:11:03 +01:00
parent b6bfe468b7
commit b2ca97568e

View File

@ -82,7 +82,7 @@ func DecodeStringFromBytes(key []byte) (pos int64, err error) {
}
func StringToBytes(key int64) []byte {
return []byte(strconv.FormatInt(key, 10))
return strconv.AppendInt(nil, key, 10)
}
// EncodeStringToBytes encodes a block pos to byte slice.