gin icon indicating copy to clipboard operation
gin copied to clipboard

'go get' is no longer supported outside a module.

Open orhan-erday opened this issue 1 year ago • 5 comments

go get is no longer supported outside a module. therefore I changed go get to go install

orhan-erday avatar Jul 21 '22 20:07 orhan-erday

have u solve it? i get this problem too.

PS D:\Dev\go\spider> go install github.com/gin-gonic/gin@latest 
package github.com/gin-gonic/gin is not a main package

SnowingFox avatar Aug 06 '22 13:08 SnowingFox

@SnowingFox firstly get your version go version command, after that if your go >= 1.17

go install github.com/gin-gonic/gin@latest

go < 1.17

go get github.com/gin-gonic/gin

orhan-erday avatar Aug 06 '22 13:08 orhan-erday

@SnowingFox firstly get your version go version command, after that if your go >= 1.17

go install github.com/gin-gonic/gin@latest

go < 1.17

go get github.com/gin-gonic/gin

my go version is 1.19, i tried use go install, but it throw me an error, so i had to use go get, it download success

SnowingFox avatar Aug 06 '22 13:08 SnowingFox

Hey ,

Same issue here.

Have you find a way to make it work ?

/home/seb/sdk/go1.18.3/bin/go version
go version go1.18.3 linux/amd64
 /home/seb/sdk/go1.18.3/bin/go install github.com/gin-gonic/gin@latest
package github.com/gin-gonic/gin is not a main package

Thanks

Stolr avatar Aug 10 '22 20:08 Stolr