no required module provides package github.com/go-sql-driver/mysql: go.mod file not found in current directory or any parent directory; see ‘go help modules’

環境: CentOS8
#dnf update -yの後に、上記メッセージが出るようになった。
解決方法: 以下を実行
# go env -w GO111MODULE=auto

# go build -o a.out main.go
main.go:6:3: no required module provides package github.com/go-sql-driver/mysql: go.mod file not found in current directory or any parent directory; see 'go help modules'
src/mariadb_1-7.go:17:2: cannot find package
# ls
a.out  errlog  lib  main.go  src
# go env -w GO111MODULE=auto
# go build -o a.out main.go
#