-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,906 changed files
with
18,745 additions
and
18,956 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ hide_title: true | |
|
||
使用以下指令可以静态编译 `Linux` 平台 `amd64` 架构的可执行文件: | ||
|
||
``` | ||
```bash | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main main.go | ||
``` | ||
|
||
|
@@ -26,7 +26,7 @@ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main main.go | |
|
||
一个参考的 `Dockerfile` 文件如下: | ||
|
||
``` | ||
```dockerfile | ||
FROM loads/alpine:3.8 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
@@ -68,7 +68,7 @@ CMD ./main | |
|
||
使用以下指令可直接运行刚才编译成的镜像: | ||
|
||
``` | ||
```bash | ||
docker run main | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ Go的开发包升级也是同样的过程。 | |
|
||
新建一个 `go` 文件,叫做 `hello.go`,并输入以下代码: | ||
|
||
``` | ||
```go | ||
package main | ||
|
||
import "fmt" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,15 @@ hide_title: true | |
|
||
#### `Mac`&`Linux` 快捷下载命令 | ||
|
||
``` | ||
```bash | ||
wget -O gf https://github.com/gogf/gf/releases/latest/download/gf_$(go env GOOS)_$(go env GOARCH) && chmod +x gf && ./gf install -y && rm ./gf | ||
``` | ||
|
||
#### Windows需手动下载 | ||
|
||
确定自己当前项目的 `goframe` 依赖版本,查看自己的系统信息: | ||
|
||
``` | ||
```bash | ||
go env GOOS | ||
go env GOARCH | ||
``` | ||
|
@@ -29,7 +29,7 @@ go env GOARCH | |
|
||
### 通过 `go install` 安装 | ||
|
||
``` | ||
```bash | ||
go install github.com/gogf/gf/cmd/gf/v2@latest # 最新版本 | ||
go install github.com/gogf/gf/cmd/gf/[email protected] # 指定版本(版本需要 >= v2.5.5) | ||
``` | ||
|
@@ -62,7 +62,7 @@ go install github.com/gogf/gf/cmd/gf/[email protected] # 指定版本(版本需要 >= v2 | |
|
||
## 使用示例 | ||
|
||
``` | ||
```bash | ||
$ ./gf_darwin_amd64 install | ||
I found some installable paths for you(from $PATH): | ||
Id | Writable | Installed | Path | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.