Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
13
pkg/utils/bytearray/bytearray.go
Normal file
13
pkg/utils/bytearray/bytearray.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package bytearray
|
||||
|
||||
import "encoding/binary"
|
||||
|
||||
func FromUInt64(input uint64) []byte {
|
||||
b := make([]byte, 8)
|
||||
binary.LittleEndian.PutUint64(b, input)
|
||||
return b
|
||||
}
|
||||
|
||||
func ToUInt64(input []byte) uint64 {
|
||||
return binary.LittleEndian.Uint64(input)
|
||||
}
|
||||
Reference in New Issue
Block a user