【报错】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/[email protected]/connector.go:45:18: undefined: strings.Cut

/root/go/pkg/mod/github.com/go-sql-driver/[email protected]/dsn.go:441:24: undefined: strings.Cut

/root/go/pkg/mod/github.com/go-sql-driver/[email protected]/dsn.go:529:18: cannot assign string to value in multiple assignment

/root/go/pkg/mod/github.com/go-sql-driver/[email protected]/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/[email protected]

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

重新运行go脚本

相关推荐
是发财不是旺财7 小时前
跟着deepseek学golang--认识golang
开发语言·后端·golang
我的golang之路果然有问题7 小时前
快速上手GO的net/http包,个人学习笔记
笔记·后端·学习·http·golang·go·net
草海桐14 小时前
go 的 net 包
网络·golang·net
Xiaoyu Wang1 天前
Go协程的调用与原理
开发语言·后端·golang
techdashen1 天前
性能比拼: Go vs Java
java·开发语言·golang
听雨·眠2 天前
go中map和slice非线程安全
java·开发语言·golang
abin在路上2 天前
Golang 版本导致的容器运行时问题
云原生·golang·containerd
{⌐■_■}2 天前
【go】什么是Go语言的GPM模型?工作流程?为什么Go语言中的GMP模型需要有P?
java·开发语言·后端·golang
why1512 天前
滴滴-golang后端开发-企业事业部门-二面
开发语言·网络·golang
Ai 编码助手2 天前
用Go语言&&正则,如何爬取数据
开发语言·后端·golang