From 442dd58ee42c8560bc4dfd680ce1a64782b35d5d Mon Sep 17 00:00:00 2001 From: chai2010 Date: Wed, 20 Jan 2016 23:08:50 +0800 Subject: [PATCH] ch10: fix code path --- ch10/ch10-05.md | 2 +- ch10/ch10-07-3.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ch10/ch10-05.md b/ch10/ch10-05.md index 43e33b0..53e4762 100644 --- a/ch10/ch10-05.md +++ b/ch10/ch10-05.md @@ -10,8 +10,8 @@ import _ "image/png" // register PNG decoder 標準庫的image圖像包包含了一個`Decode`函數,用於從`io.Reader`接口讀取數據併解碼圖像,它調用底層註冊的圖像解碼器來完成任務,然後返迴image.Image類型的圖像。使用`image.Decode`很容易編寫一個圖像格式的轉換工具,讀取一種格式的圖像,然後編碼爲另一種圖像格式: +gopl.io/ch10/jpeg ```Go -gopl.io/ch10/jpeg // The jpeg command reads a PNG image from the standard input // and writes it as a JPEG image to the standard output. package main diff --git a/ch10/ch10-07-3.md b/ch10/ch10-07-3.md index ac1371e..d3b765f 100644 --- a/ch10/ch10-07-3.md +++ b/ch10/ch10-07-3.md @@ -69,9 +69,8 @@ $ go run quoteargs.go one "two three" four\ five 針對不同操作繫統或CPU的交叉構建也是很簡單的。隻需要設置好目標對應的GOOS和GOARCH,然後運行構建命令卽可。下面交叉編譯的程序將輸出它在編譯時操作繫統和CPU類型: +gopl.io/ch10/cross ```Go -gopl.io/ch10/cross - func main() { fmt.Println(runtime.GOOS, runtime.GOARCH) }