From b2ca97568e1efbaed8dd3a34f6de14f288f82669 Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Sat, 25 Feb 2017 00:11:03 +0100 Subject: [PATCH] Call better suited strconv.AppendInt when converting keys to byte slices. --- common/coords.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/coords.go b/common/coords.go index 6aa42fd..f66c365 100644 --- a/common/coords.go +++ b/common/coords.go @@ -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.