The error reported by golang when referring to a third-party package: no required module provides package [perfect solution]

golang third-party package reference error: no required module provides package : go.mod file not found in current directory or any parent directory;
Package needs to be poured in.
go get github.com/denisenkom/go-mssqldb
go get github.com/mattn/go-adodb
No response from all of them, let’s analyze what the problem is.

Command: go env
First exclude go env inside: GO111MODULE (mine is GO111MODULE=”on”, resulting in download failure)

Execute: go env -w GO111MODULE=auto

Similar Posts: