1
0
mirror of https://bitbucket.org/s_l_teichmann/mtsatellite synced 2025-04-23 04:10:24 +02:00

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

@ -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.