mirror of
https://github.com/astaxie/beego.git
synced 2024-11-05 06:50:54 +00:00
13 lines
185 B
Go
13 lines
185 B
Go
|
// +build !appengine
|
||
|
|
||
|
package util
|
||
|
|
||
|
import (
|
||
|
"unsafe"
|
||
|
)
|
||
|
|
||
|
// BytesToString converts byte slice to string.
|
||
|
func BytesToString(b []byte) string {
|
||
|
return *(*string)(unsafe.Pointer(&b))
|
||
|
}
|