diff options
author | Christian Pointner <equinox@spreadspace.org> | 2017-05-01 22:59:30 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2017-05-01 22:59:30 +0200 |
commit | 17e56fd943362b2c0d61c566afbaf23d03deadee (patch) | |
tree | 42132a26af421feb12c9160503ed28cb07d1b9cc /src | |
parent | refactored test cases a little (diff) |
switch back to binary indeces
Diffstat (limited to 'src')
-rw-r--r-- | src/hub/src/spreadspace.org/sfive/s5typesStore.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5typesStore.go b/src/hub/src/spreadspace.org/sfive/s5typesStore.go index e940dff..5f6dc6a 100644 --- a/src/hub/src/spreadspace.org/sfive/s5typesStore.go +++ b/src/hub/src/spreadspace.org/sfive/s5typesStore.go @@ -33,9 +33,9 @@ package sfive import ( + "encoding/binary" "errors" "fmt" - "strconv" "strings" "time" ) @@ -148,10 +148,11 @@ func (s *DataUpdateFull) CopyFromDataUpdateDb(v dataUpdateDb, srcHubUuid, hubUui } func itob(v int) []byte { - return []byte(strconv.Itoa(v)) + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, uint64(v)) + return b } func btoi(b []byte) int { - i, _ := strconv.Atoi(string(b)) - return i + return int(binary.BigEndian.Uint64(b)) } |