gorilla/mux

Cannot install gorilla/mux with new install command of go

foragerDev opened this issue · 2 comments

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

when I run this command its says something liket his:

PS C:\Users\DELL\shop-server> go install github.com/gorilla/mux@latest
package github.com/gorilla/mux is not a main package

Expected Behavior

It should install the package

Steps To Reproduce

Just try to install this package on go 1.20.

Anything else?

No response

jdlms commented

mux is a library, not an executable. Instead of using the install command, add this to your imports: "github.com/gorilla/mux" and then run go mod tidy.

You can also use the go get command to add it to your project