2015-08-21 11:23:52 +03:00
|
|
|
// +build !appengine
|
|
|
|
|
2015-07-18 10:39:03 +03:00
|
|
|
package redis
|
|
|
|
|
2015-09-04 13:30:37 +03:00
|
|
|
import (
|
|
|
|
"reflect"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2015-07-18 10:39:03 +03:00
|
|
|
func bytesToString(b []byte) string {
|
2015-09-04 13:30:37 +03:00
|
|
|
bytesHeader := (*reflect.SliceHeader)(unsafe.Pointer(&b))
|
|
|
|
strHeader := reflect.StringHeader{bytesHeader.Data, bytesHeader.Len}
|
|
|
|
return *(*string)(unsafe.Pointer(&strHeader))
|
2015-07-18 10:39:03 +03:00
|
|
|
}
|