diff options
author | Christian Pointner <equinox@spreadspace.org> | 2017-04-28 00:33:45 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2017-04-28 00:33:45 +0200 |
commit | 6b36088df174b28964bfb4da40ba5aee17bdab0f (patch) | |
tree | 0d410c38d774d9d28eb53dcba7c0185b25849290 | |
parent | forwarding works now (diff) |
use printable characters for itob/btoi
-rw-r--r-- | src/hub/src/spreadspace.org/sfive/s5typesStore.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5typesStore.go b/src/hub/src/spreadspace.org/sfive/s5typesStore.go index e2ea6f0..cf6cc17 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" ) @@ -147,11 +147,10 @@ func (s *DataUpdateFull) CopyFromDataUpdateDb(v dataUpdateDb, srcHubUuid, hubUui } func itob(v int) []byte { - b := make([]byte, 8) - binary.BigEndian.PutUint64(b, uint64(v)) - return b + return []byte(strconv.Itoa(v)) } func btoi(b []byte) int { - return int(binary.BigEndian.Uint64(b)) + i, _ := strconv.Atoi(string(b)) + return i } |