Fixed go_vet

This commit is contained in:
Evgeny Proydakov
2017-03-23 18:30:56 +03:00
parent ffd2765b61
commit eb9fd69891
+1 -1
View File
@@ -19,6 +19,6 @@ import (
// may be garbage-collected even when the string exists.
func bytesToStr(data []byte) string {
h := (*reflect.SliceHeader)(unsafe.Pointer(&data))
shdr := reflect.StringHeader{h.Data, h.Len}
shdr := reflect.StringHeader{Data: h.Data, Len: h.Len}
return *(*string)(unsafe.Pointer(&shdr))
}