* Update 11.9.md

修正166行一个错误,ix 改为i

* Update 11.14.md

34-43行代码错误,会造成无法运行

* 修改一处权限bug,否则会造成linux下生成的文件为空
This commit is contained in:
风子
2017-05-17 21:35:19 -05:00
committed by 无闻
parent 5d47b589d4
commit 1177b673b4
4 changed files with 8 additions and 7 deletions

View File

@@ -69,7 +69,7 @@ func main() {
js, _ := json.Marshal(vc)
fmt.Printf("JSON format: %s", js)
// using an encoder:
file, _ := os.OpenFile("vcard.json", os.O_CREATE|os.O_WRONLY, 0)
file, _ := os.OpenFile("vcard.json", os.O_CREATE|os.O_WRONLY, 0666)
defer file.Close()
enc := json.NewEncoder(file)
err := enc.Encode(vc)