Vikrant Payal

Common issues


Golang

go get not working,

Problem:
You are trying to install a go package, ex. gorilla mux, using go get and you get the error:
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,

Solution:
Do - Initialize go.mod using go mode init example.com/m. Then run go get package-name
Don't - Try go install