mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-16 15:20:20 +01:00
Call better suited strconv.AppendInt when converting keys to byte slices.
This commit is contained in:
parent
b6bfe468b7
commit
b2ca97568e
|
@ -82,7 +82,7 @@ func DecodeStringFromBytes(key []byte) (pos int64, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func StringToBytes(key int64) []byte {
|
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.
|
// EncodeStringToBytes encodes a block pos to byte slice.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user