github.com/gin-gonic/gin/context.go:80:11: undefined: http.SameSite
环境:Linux
版本:go1.10.3
发生原由:在安装go get -u github.com/gin-contrib/sessions发生这个错误
github.com/gin-gonic/gin/context.go:80:11: undefined: http.SameSite
原因:go版本过低
解决方法:
卸载go:
查看GOROOT位置:go env 我这里GOROOT=/usr/local/go
删除GO rm -rf /usr/local/go
安装1.15.11版本:(根据现有最新
原创
2021-04-14 00:36:27 ·
291 阅读 ·
0 评论