0
1

More than 3 years have passed since last update.

Golangでインストールしたパッケージ(依存パッケージも含む)のversion確認方法

Posted at

概要

Go言語で依存パッケージも含めてパッケージのversionを確認したいときに利用するコマンドです。
ただ、注意点としては、パッケージの開発が別のリポジトリに移動すると最新のversionを追えません。

go list -m -u all

試してみた

試しに、goのsample projectで上記のコマンドを試してみたいと思います。
cloneしたsample => https://github.com/golang/example

❯ go list -m -u all
go: finding github.com/yuin/goldmark v1.2.1
go: finding golang.org/x/net v0.0.0-20201021035429-f5854403a974
go: finding golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
go: finding golang.org/x/tools v0.0.0-20210112183307-1e6ecd4bf1b0
go: finding golang.org/x/xerrors latest
go: finding golang.org/x/sync latest
go: finding golang.org/x/sys latest
go: finding golang.org/x/crypto latest
go: finding golang.org/x/net latest
golang.org/x/example
github.com/yuin/goldmark v1.2.1 [v1.3.2]
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 [v0.0.0-20210314154223-e6e6c4f2bb5b]
golang.org/x/mod v0.3.0 [v0.4.2]
golang.org/x/net v0.0.0-20201021035429-f5854403a974 [v0.0.0-20210316092652-d523dce5a7f4]
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 [v0.0.0-20210220032951-036812b2e83c]
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f [v0.0.0-20210317091845-390168757d9c]
golang.org/x/text v0.3.3 [v0.3.5]
golang.org/x/tools v0.0.0-20210112183307-1e6ecd4bf1b0 [v0.1.0]
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
  • 最新のversionと差異がある場合は下記のように表示されます。
  • 左側のv1.2.1がcurrent versionで右側の[v1.3.2]がlatest versionとなります。
github.com/yuin/goldmark v1.2.1 [v1.3.2]
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1