From 3f4277c784976c6aead8db9b1bb2b7593f535d7b Mon Sep 17 00:00:00 2001 From: Alex Nguyen Date: Wed, 26 Jun 2019 13:29:00 +0700 Subject: [PATCH] Fix some error in code block example ch2-03 --- ch2-cgo/ch2-03-cgo-types.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ch2-cgo/ch2-03-cgo-types.md b/ch2-cgo/ch2-03-cgo-types.md index 8fbb53f..ab5a188 100644 --- a/ch2-cgo/ch2-03-cgo-types.md +++ b/ch2-cgo/ch2-03-cgo-types.md @@ -326,8 +326,10 @@ static char arr[10]; static char *s = "Hello"; */ import "C" -import "fmt" - +import ( + "reflect" + "unsafe" +) func main() { // 通过 reflect.SliceHeader 转换 var arr0 []byte