Reputation: 66
C:\Users\Administrator\Documents\code\projects\weatherly>go get -u github.com/gofiber/fiber/v2
cannot find package "github.com/gofiber/fiber/v2" in any of:
c:\go\src\github.com\gofiber\fiber\v2 (from $GOROOT)
C:\Users\Administrator\go\src\github.com\gofiber\fiber\v2 (from $GOPATH)
How do I download the package? I believe that it is trying to check what is cached on my computer and I don't know how to download it first.
Upvotes: 1
Views: 2341
Reputation: 617
Its because you haven't initiated your module, you should use go mod init YourModuleName
, then its pretty simple to do. also remove -f from go get command.
Upvotes: 1