How do I disable gogy
To disable Go modules in a Go project, follow these steps:
Open the terminal.
Navigate to the root directory of your Go project using the
cd
command.Run the following command to set the
GO111MODULE
environment variable to "off":bash go env -w GO111MODULE=off
Optionally, you can remove the
go.mod
andgo.sum
files if they exist in your project directory:bash rm go.mod go.sum
Now, Go modules are disabled in your project. If you removed the go.mod
and go.sum
files, your project will no longer use Go modules.