Home > Software design >  trouble installing "gorilla/mux" in golang
trouble installing "gorilla/mux" in golang

Time:09-01

So I installed gorilla/mux to use it for my API by typing this code on terminal

go get -u github.com/gorilla/mux

And since it didn't return any errors (nor any texts) I thought the install was successful. But When I started to use "mux. "something, vscode showed that the name "mux" is not declared. Does anyone had any similar experience or know how to solve the problem? Thanks in advance.

(Using go1.18.3)

CodePudding user response:

Your project doesn't have go.sum file.

Run go mod tidy and you will be good to go.

  • Related