'why i cant list the golang package version
i check the package with git list
go list -m -versions github.com/vladimirvivien/go4vl
github.com/vladimirvivien/go4vl v0.0.0-alpha v0.0.1
the package has 2 vesison :
- v0.0.0-alpha
- v0.0.1
the result is same as from
https://github.com/vladimirvivien/go4vl/tags .
but device-usb-camera use a package verion of following:
git remote -v
origin https://github.com/wubigo/device-usb-camera.git (fetch)
origin https://github.com/wubigo/device-usb-camera.git (push)
go list -m all | grep github.com/vladimirvivien/go4vl | awk '{print $2}'
v0.0.2-0.20211216162907-40b41ba86c5c
why i can't see the version of v0.0.2-0.20211216162907-40b41ba86c5c?
Many thanks
Solution 1:[1]
use the commit id of 40b41ba as the pkg version
go get github.com/vladimirvivien/go4vl@40b41ba
go get: upgraded github.com/vladimirvivien/go4vl v0.0.1 => v0.0.2-0.20211216162907-40b41ba86c5c
https://deepsource.io/blog/go-modules/#which-version-is-pulled-by-default
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
