【报错】note: module requires Go 1.18

$ go run tableSize.go
# github.com/go-sql-driver/mysql
/root/go/pkg/mod/github.com/go-sql-driver/mysql@v1.8.0/connector.go:45:18: undefined: strings.Cut
/root/go/pkg/mod/github.com/go-sql-driver/mysql@v1.8.0/dsn.go:441:24: undefined: strings.Cut
/root/go/pkg/mod/github.com/go-sql-driver/mysql@v1.8.0/dsn.go:529:18: cannot assign string to value in multiple assignment
/root/go/pkg/mod/github.com/go-sql-driver/mysql@v1.8.0/dsn.go:639:28: cannot assign string to cfg.Params[key] in multiple assignment
note: module requires Go 1.18

 go get github.com/go-sql-driver/mysql@v1.7

go get: downgraded github.com/go-sql-driver/mysql v1.8.0 => v1.7.1

重新运行go脚本

相关推荐

  1. 【Linux】安装Python3.11

    2024-03-26 08:10:02       10 阅读
  2. 】note: module requires Go 1.18

    2024-03-26 08:10:02       16 阅读
  3. IDEA

    2024-03-26 08:10:02       39 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-03-26 08:10:02       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-03-26 08:10:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-03-26 08:10:02       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-03-26 08:10:02       20 阅读

热门阅读

  1. minio静态html不显示js样式

    2024-03-26 08:10:02       18 阅读
  2. NPM是什么?及常用的命令

    2024-03-26 08:10:02       18 阅读
  3. ARMday5

    2024-03-26 08:10:02       18 阅读
  4. 开发npm上传发布

    2024-03-26 08:10:02       18 阅读
  5. 6、jenkins项目构建类型1-项目类型介绍

    2024-03-26 08:10:02       16 阅读
  6. npm常用命令

    2024-03-26 08:10:02       17 阅读
  7. npm常用命令解释

    2024-03-26 08:10:02       19 阅读
  8. 卷积神经网络基本知识

    2024-03-26 08:10:02       18 阅读
  9. Python实现VMware自动化资源巡检

    2024-03-26 08:10:02       17 阅读
  10. LAMP动态网站

    2024-03-26 08:10:02       18 阅读
  11. 前端理论总结(css3)——css优化的方法

    2024-03-26 08:10:02       13 阅读