background/utils/base.go

14 lines
188 B
Go
Raw Normal View History

2019-04-07 04:25:07 +00:00
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
}