Not able to import the gorilla/mux package even though it is installed. i used the command "go get github.com/gorilla/mux" to install the package which installed the package under the pkg directory as per the GOPATH as below.
C:\Users*\go;C:\Users*\goProject
But as go Looks for the packages in the src directory, i moved the Gorilla package to the folder "C:\Users*\goProject\src" folder and removed the go.mod file. After that i initialized the package bu executing the command "go mod init" but still import fails.
Please find below the snap shot . Can anyone please help with this issue.
Solution for the above issue
Hi if your project is small and only has one package(few files in the same folder which are in the same scope) please follow these steps:
for more advanced projects, you can follow 1 and 2 step and then create folders for your desing and have multiple main packages in separate folders and create multiple executable binaries, if you need more details you are welcome to ask