[Go] Solve can’t load package: cannot find module providing package github.com/xxxxx

When I execute go install github.com/xxxxx, I get an error:

can’t load package: cannot find module providing package github.com/xxx: working directory is not part of a module

Use the go module to solve the dependency problem

Execute it

go mod init

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *