first commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package lib
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
)
|
||||
|
||||
func BytesToInt(bys []byte) int {
|
||||
bytebuff := bytes.NewBuffer(bys)
|
||||
var data int64
|
||||
binary.Read(bytebuff, binary.BigEndian, &data)
|
||||
return int(data)
|
||||
}
|
||||
Reference in New Issue
Block a user