go-gallery/vendor/github.com/go-redis/redis/internal/util/unsafe.go

13 lines
185 B
Go
Raw Normal View History

2018-04-18 06:16:29 +00:00
// +build !appengine
package util
import (
"unsafe"
)
// BytesToString converts byte slice to string.
func BytesToString(b []byte) string {
return *(*string)(unsafe.Pointer(&b))
}