The go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src warning is raised when you encounter related to the Go module system and your GOPATH.
Starting from Go 1.16, Go modules are enabled by default, but your current setup seems to have GO111MODULE set to auto. When set to auto, Go uses the old GOPATH mode if the project is inside GOPATH/src and modules if the project is outside GOPATH/src.
To fix the warning, you have the following options:
Option 1: Enable Go modules explicitly
Set the GO111MODULE environment variable to on. This will enable Go modules explicitly, regardless of your project’s location.
export GO111MODULE=on
After setting this environment variable, you can run the go get command.
Option 2: Move your project outside of the GOPATH/src
If your project is inside the GOPATH/src directory, you can move it to another location outside of the GOPATH. This way, Go will automatically enable modules for your project.
After moving your project, make sure to run go mod init to initialize the Go module for your project if you haven’t done so already:
go mod init example.com/myproject
Then, replace example.com/myproject with your project’s import path.
By following either of these approaches, you should be able to resolve the warning message and use the Go modules effectively.

Krunal Lathiya is a seasoned Computer Science expert with over eight years in the tech industry. He boasts deep knowledge in Data Science and Machine Learning. Versed in Python, JavaScript, PHP, R, and Golang. Skilled in frameworks like Angular and React and platforms such as Node.js. His expertise spans both front-end and back-end development. His proficiency in the Python language stands as a testament to his versatility and commitment to the craft.