Skip to content

Commit

Permalink
fix: 增加go install注意事项
Browse files Browse the repository at this point in the history
  • Loading branch information
hailaz committed Jan 8, 2025
1 parent 6feaf2b commit 6e114e8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
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` 查看。

#### 最新版本

```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,11 +32,21 @@ 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

#### v2 Version
Expand Down

0 comments on commit 6e114e8

Please sign in to comment.