mirror of
https://github.com/go-i2p/go-i2p.git
synced 2025-07-04 05:26:51 -04:00
I2P string format
This commit is contained in:
@ -4,7 +4,14 @@ import (
|
||||
"encoding/binary"
|
||||
)
|
||||
|
||||
func Integer(number ...byte) int {
|
||||
func Integer(number []byte) int {
|
||||
num_len := len(number)
|
||||
if num_len < 8 {
|
||||
number = append(
|
||||
make([]byte, 8-num_len),
|
||||
number...,
|
||||
)
|
||||
}
|
||||
return int(
|
||||
binary.BigEndian.Uint64(number),
|
||||
)
|
||||
|
Reference in New Issue
Block a user