diff options
-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)) } |