问题遇到的现象和发生背景
go 安装redis问题,go get 不能用
问题相关代码,请勿粘贴截图
go install github.com/gomodule/redigo@latest
go: github.com/gomodule/redigo@latest: module github.com/gomodule/redigo@latest found (v1.8.8), but does not contain package github.com/gomodule/redigo
运行结果及报错内容
go install github.com/gomodule/redigo@latest
go: github.com/gomodule/redigo@latest: module github.com/gomodule/redigo@latest found (v1.8.8), but does not contain package github.com/gomodule/redigo
我的解答思路和尝试过的方法
go get也不行
go get github.com/gomodule/redigo/redis
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'.