gin icon indicating copy to clipboard operation
gin copied to clipboard

slices package not found

Open wangqing-github opened this issue 11 months ago • 5 comments

when i execute go get: go get -u github.com/gin-gonic/gin

error msg: gogogo/gin imports github.com/gin-gonic/gin imports golang.org/x/net/http2 tested by golang.org/x/net/http2.test imports slices: no Go source files

image

The project won't start 7e6047d6423f46c52ba44108a8a869fe

After I removed the reference to gin, the project returned to normal

wangqing-github avatar Dec 30 '24 10:12 wangqing-github

The slices package was moved from the experimental library to the standard library in go version 1.21. You can upgrade go version later than 1.21 or downgrade gin version.

VarusHsu avatar Dec 30 '24 11:12 VarusHsu

It's seem that upgrade go version is a better way.

VarusHsu avatar Dec 30 '24 13:12 VarusHsu

It's seem that upgrade go version is a better way.

OK thanks

wangqing-github avatar Dec 31 '24 07:12 wangqing-github

Hello @wangqing-github, do you think this resolved your issue? If so, please close this issue so we can keep a nice and clean repository.

pscheid92 avatar Jan 11 '25 09:01 pscheid92

You can use such as "go get github.com/gin-gonic/[email protected]", do not add the -u parameter, this will only pull the dependencies of v1.8.2. After adding the -u parameter, you will try to automatically upgrade all Small versions of dependencies, higher versions of dependencies may use higher versions of golang features, such as slices

catwrench avatar Feb 13 '25 05:02 catwrench