goland 引入gin 使用标红Cannot resolve symbol ‘gin-gonic’

错误信息

goland 引入gin 使用标红Cannot resolve symbol ‘gin-gonic’

报错原因:

go mod 文件没有require包,或者没有初始化mod

解决

go mod init gin

go mod edit -require github.com/gin-gonic/gin@latest

    未经允许不得转载:任鹏个人博客 » goland 引入gin 使用标红Cannot resolve symbol ‘gin-gonic’

    赞 (0) 打赏

    评论 0

    取消
    • 昵称 (必填)
    • 邮箱 (必填)
    • 网址

    觉得文章有用就打赏一下文章作者

    支付宝扫一扫打赏

    微信扫一扫打赏