14 lines
188 B
Go
14 lines
188 B
Go
|
package utils
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
func ByteSliceToString(b []byte) string {
|
||
|
var ret string
|
||
|
|
||
|
for i := 0; i < len(b); i++ {
|
||
|
s := fmt.Sprintf("%02x", b[i])
|
||
|
ret += string(s)
|
||
|
}
|
||
|
return ret
|
||
|
}
|