mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2025-08-08 00:03:26 +00:00
ch10: fix code path
This commit is contained in:
@@ -69,9 +69,8 @@ $ go run quoteargs.go one "two three" four\ five
|
||||
|
||||
針對不同操作繫統或CPU的交叉構建也是很簡單的。隻需要設置好目標對應的GOOS和GOARCH,然後運行構建命令卽可。下面交叉編譯的程序將輸出它在編譯時操作繫統和CPU類型:
|
||||
|
||||
<u><i>gopl.io/ch10/cross</i></u>
|
||||
```Go
|
||||
gopl.io/ch10/cross
|
||||
|
||||
func main() {
|
||||
fmt.Println(runtime.GOOS, runtime.GOARCH)
|
||||
}
|
||||
|
Reference in New Issue
Block a user