1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 04:22:22 +00:00

Fix some error in code block example ch2-03

This commit is contained in:
Alex Nguyen 2019-06-26 13:29:00 +07:00 committed by GitHub
parent bb2c183683
commit 3f4277c784
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -326,8 +326,10 @@ static char arr[10];
static char *s = "Hello"; static char *s = "Hello";
*/ */
import "C" import "C"
import "fmt" import (
"reflect"
"unsafe"
)
func main() { func main() {
// 通过 reflect.SliceHeader 转换 // 通过 reflect.SliceHeader 转换
var arr0 []byte var arr0 []byte