烂翻译系列之Iris——新手入门——安装

Installation  安装


Iris is a cross-platform software.

Iris是一个跨平台软件。

The only requirement is the Go Programming Language, version 1.15 and above.

唯一的要求是Go编程语言,版本为1.14和以上。


 Install  安装

在终端中执行以下命令以下载Iris:

$ go get github.com/kataras/iris/v12@master

Or edit your project's go.mod file.

或编辑你项目中的go.mod文件

module your_project_name

go 1.15

require (
github.com/kataras/iris/v12 master
)

在终端中执行以下命令以构建应用:

$ go build

Troubleshooting  故障排除

If you get a network error during installation please make sure you set a valid GOPROXY environment variable.

如果你在安装期间遇到网络错误,请确保你设置了可用的GOPROXY环境变量。

go env -w GOPROXY=https://goproxy.cn,https://gocenter.io,https://goproxy.io,direct

Perform a clean of your go modules cache if none of the above worked:

如果上面的设置不起作用,需要清理模块缓存:

go clean --modcache
posted @ 2021-12-13 10:04  菜鸟吊思  阅读(338)  评论(0)    收藏  举报