浏览代码

Merge pull request #182 from sugeladi/patch-4

Update 12.11.md
Unknwon 10 年之前
父节点
当前提交
242ec60fd8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      eBook/12.11.md

+ 1 - 1
eBook/12.11.md

@@ -114,7 +114,7 @@ func main() {
 	vc := VCard{"Jan", "Kersschot", []*Address{pa,wa}, "none"}
 	// fmt.Printf("%v: \n", vc) // {Jan Kersschot [0x126d2b80 0x126d2be0] none}:
 	// using an encoder:
-	file, _ := os.OpenFile("vcard.gob", os.O_CREATE|os.O_WRONLY, 0)
+	file, _ := os.OpenFile("vcard.gob", os.O_CREATE|os.O_WRONLY, 0666)
 	defer file.Close()
 	enc := gob.NewEncoder(file)
 	err := enc.Encode(vc)