在下载gin框架时,出现超时报错
运行go项目时报错:
go: github.com/gin-contrib/sse@v0.1.0: Get "https://proxy.golang.org/github.com/gin-contrib/sse/@v/v0.1.0.mod": dial tcp 142.251.42.241:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
成功解决:
PS E:\Go-Back_EndCamp\go-project-example-main> go env -w GO111MODULE=on
PS E:\Go-Back_EndCamp\go-project-example-main> go env -w GOPROXY=https://goproxy.io,direct
PS E:\Go-Back_EndCamp\go-project-example-main> go get gopkg.in/gin-gonic/gin.v1@v1.3.0
go 数据库 报错
[error] failed to initialize database, got error Error 1045: Access denied for user 'root'@'localhost' (using password: YES)
exit status 0xffffffff
解决:
1.VScode 下载MySQL插件
2.运行sql文件
3.修改登录名与密码
dsn := 用户名:密码
问题:curl 失败
成功解决:
1.运行下面命令。由于Windows Powershell的一些设置需要运行下面的命令
Remove-item alias:curl
2.修改IP为127.0.0.1
再次运行:
获得另一个页面