项目作者: joshuabezaleel

项目描述 :
Get the latest version of a Go module
高级语言: Go
项目地址: git://github.com/joshuabezaleel/latest-version.git
创建时间: 2020-05-14T20:48:15Z
项目社区:https://github.com/joshuabezaleel/latest-version

开源协议:MIT License

下载


latest-version

Determine the latest available version of a module from proxy.golang.org.
Useful for tools that plan to check available upgrades.

Installation

  1. $ go get github.com/joshuabezaleel/latest-version

Usage

  1. import (
  2. latestver "github.com/joshuabezaleel/latest-version
  3. )
  4. func main() {
  5. latestVersion, _ := latestver.LatestVersion("github.com/hashicorp/raft")
  6. log.Println(latestVersion)
  7. // 1.1.2
  8. }

Prior Art

Highly inspired by sindesorhus’ latest-version

License

MIT License