简体   繁体   English

使用 go 检查是否有新版本的基于 go 的二进制文件可用

[英]Check if a new version of go based binary is available using go get

I am a little bit new to Go, specifically go get mechanism to download single binaries (CLI apps).我对 Go 有点陌生,特别是go get下载单个二进制文件(CLI 应用程序)的机制。 Some cool projects in github allow you to download cli apps using go get . github 中的一些很酷的项目允许您使用go get下载 cli 应用程序。 How can I check that binary that I installed is outdated?如何检查我安装的二进制文件是否已过时? I am looking for something like debian based apt update that checks for newest package versions without installing them.我正在寻找基于 debian 之类的apt update ,无需安装即可检查最新的 package 版本。

As an example.举个例子。 Let's say that I installed lazygit using go get github.com/jesseduffield/lazygit .假设我使用go get github.com/jesseduffield/lazygit And after a while a new version was released in github.一段时间后,在 github 中发布了一个新版本。 Is it possible to check new version of binary using go get ?是否可以使用go get检查新版本的二进制文件?

I checked the help and found the -u flag.我检查了帮助并找到了 -u 标志。 Use go get -u github.com/jesseduffield/lazygit to update the tool.使用go get -u github.com/jesseduffield/lazygit更新工具。

None of this is speicific to the GitHub.这些都不是 GitHub 特有的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM