```
package main
import (
"fmt"
"unsafe"
)
type stringssHeader struct {
Data unsafe.Pointer
Len int
Byt byte
}
func main() {
var bytes = []byte{0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 'h', 'c'}
var ptr = &bytes[0]
header := (*stringssHeader)(unsafe.Pointer(ptr))
header.Data = unsafe.Pointer(&bytes[17])
fmt.Println(*(*string)(unsafe.Pointer(ptr)))
}
```
header := (*stringssHeader)(unsafe.Pointer(ptr))
header.Data = unsafe.Pointer(&bytes[17])
这2行的意义是什么,求解惑
有疑问加站长微信联系(非本文作者)