记录安装beego 脚手架报的错

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6


第一步

1、beego 安装
go get github.com/astaxie/beego
错误一:
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install example.com/cmd@latest'
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
解决方法
go mod init StuGoPro

第二步

2、bee工具安装
go get github.com/beego/bee

第三步

官方文档说,下载以后会自动在GAPATH/bin下生成bee.exe可执行文件,但是我这里是没有

笨方法:
把astaxie/beego beego/bee 使用git clone 克隆到本地了,然后把bee整个项目放到beego目录下,然后放到GOPATH/src/github.com工作区中,然后进入到bee目录执行以下命令:
go build main.go
这回终于成功了,生成了一个main.exe可执行文件,执行以下就是bee工具,现在你只需要把这个可执行文件重命名为bee.exe

记录安装beego 脚手架报的错_可执行文件


阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
标签: go