gourouting / singo

Gin+Gorm开发Golang API快速开发脚手架
MIT License
1.83k stars 328 forks source link

go run main.go 报错,似乎是redis驱动版本太旧 #21

Closed js00070 closed 4 years ago

js00070 commented 5 years ago
go run main.go 
go: github.com/go-redis/redis@v6.15.3+incompatible: reading https://goproxy.io/github.com/go-redis/redis/@v/v6.15.3+incompatible.mod: 410 Gone

似乎是redis驱动版本太旧的原因

删除go.mod后,重新构建依赖

rm go.mod
go mod init singo
go mod tidy

新的依赖包版本是这样的:

module singo

go 1.13

require (
    github.com/gin-contrib/cors v1.3.0
    github.com/gin-contrib/sessions v0.0.1
    github.com/gin-gonic/gin v1.4.0
    github.com/go-redis/redis v6.15.6+incompatible
    github.com/jinzhu/gorm v1.9.11
    github.com/joho/godotenv v1.3.0
    golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c
    gopkg.in/go-playground/validator.v8 v8.18.2
    gopkg.in/yaml.v2 v2.2.7
)
js00070 commented 5 years ago

giligili也有同样的问题

SilenceTiger commented 4 years ago

对的,redis的版本依赖有问题,我回退到github.com/go-redis/redis v6.15.2+incompatible 这里可以解决

bydmm commented 4 years ago

准确的说是你们go版本太新