Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 增加go install注意事项 #148

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions docs/docs/开发工具/工具安装-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ description: '在不同操作系统上安装GoFrame工具,包括MacOS和Window

### 最新版下载

#### `Mac`&`Linux` 快捷下载命令
#### `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需手动下载
#### Windows 需手动下载

确定自己当前项目的 `goframe` 依赖版本,查看自己的系统信息:

Expand All @@ -32,25 +32,29 @@ go env GOARCH

### 通过 `go install` 安装

注意:需要将 `GOPATH/bin` 加入到系统环境变量中,通过 `go env GOPATH` 查看。
hailaz marked this conversation as resolved.
Show resolved Hide resolved

#### 最新版本

```bash
go install github.com/gogf/gf/cmd/gf/v2@latest
```

#### 指定版本(版本需要 >= v2.5.5)

```bash
go install github.com/gogf/gf/cmd/gf/[email protected]
```

### 其它版本下载

#### v2版本
#### v2 版本

预编译二进制下载: [releases](https://github.com/gogf/gf/releases)

源码:[gf/cmd/gf](https://github.com/gogf/gf/tree/master/cmd/gf)

#### v1版本
#### v1 版本

预编译二进制下载: [releases](https://github.com/gogf/gf-cli/releases)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,18 @@ Download link: [releases](https://github.com/gogf/gf/releases)

### Install via `go install`

Note: Add `GOPATH/bin` to the system environment variables, check with `go env GOPATH`.

#### Latest version

```bash
go install github.com/gogf/gf/cmd/gf/v2@latest # Latest version
go install github.com/gogf/gf/cmd/gf/[email protected] # Specify version (version needs to be >= v2.5.5)
go install github.com/gogf/gf/cmd/gf/v2@latest
```

#### Specify version (version needs to be >= v2.5.5)

```bash
go install github.com/gogf/gf/cmd/gf/[email protected]
```

### Download Other Versions
Expand Down Expand Up @@ -77,4 +86,4 @@ I found some installable paths for you(from $PATH):
4 | true | false | /Users/john/.ft
please choose one installation destination [default 0]:
gf binary is successfully installed to: /usr/local/bin
```
```
Loading