直接github下载goframe命令行工具Releases · gogf/gf
然后安装.
运行goframe项目,如果有报错提示net\ghttp\ghttp_server.go:300:9: table.SetHeader undefined (type *tablewriter.Table has no field or method SetHeader) ….\net\ghttp\ghttp_server.go:301:9: table.SetRowLine undefined (type *tablewriter.Table has no field or method SetRowLine) ….\net\ghttp\ghttp_server.go:302:9: table.SetBorder undefined (type *tablewriter.Table has no field or method SetBorder) ….\net\ghttp\ghttp_server.go:303:9: table.SetCenterSeparator undefined (type *tablewriter.Table has no field or method SetCenterSeparator)
在项目所在目录打开管理员命令行:(FOR /F “tokens=*” %G IN (‘go list -m -f “{{if and .Indirect (not .Main)}}{{.Path}}{{end}}” all’) DO @go mod edit -droprequire=%G) & go mod tidy
如果报错信息如下:
go: can’t compute ‘all’ using the vendor directory (Use -mod=mod or -mod=readonly to bypass.)
则执行:
(FOR /F “tokens=*” %G IN (‘go list -mod=mod -m -f “{{if and .Indirect (not .Main)}}{{.Path}}{{end}}” all’) DO @go mod edit -droprequire=%G) & go mod tidy






暂无评论内容