Skip to content

Commit

Permalink
增加go源码编译示例
Browse files Browse the repository at this point in the history
  • Loading branch information
zc2638 committed May 11, 2019
1 parent a511a36 commit 075e51d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ gosl web
- [**expvar**](https://github.com/zc2638/go-standard/tree/master/src/expvar)      公共变量
- [**flag**](https://github.com/zc2638/go-standard/tree/master/src/flag)        命令行参数解析
- [**fmt**](https://github.com/zc2638/go-standard/tree/master/src/fmt)         格式化I/O
- [**go**](https://github.com/zc2638/go-standard/tree/master/src/go)        GO常用命令
- [**hash**](https://github.com/zc2638/go-standard/tree/master/src/hash)       提供hash函数的接口
- [**html**](https://github.com/zc2638/go-standard/tree/master/src/html)        转义和解转义HTML文本
- [**image**](https://github.com/zc2638/go-standard/tree/master/src/image)       实现了基本的2D图片库
Expand Down
19 changes: 19 additions & 0 deletions src/go/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## GO源码编译

mac下编译为linux
> CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
mac下编译为windows
> CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build
linux下编译为mac
> CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build
linux下编译为windows
> CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build
windows下编译为mac
> CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build main.go
windows下编译为linux
> CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.go

0 comments on commit 075e51d

Please sign in to comment.