# go-version

> A Go library for parsing and verifying versions and version constraints

Source: https://talira.ai/catalog/go-version-zmf5dep4
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / semantic versioning](https://talira.ai/categories/libraries/semantic-versioning), [languages / go](https://talira.ai/categories/languages/go)
- Licence: MPL-2.0[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (MPL-2.0).
- Free tier: yes[^1]
- Supports: [SemVer](https://talira.ai/standards/semver.md)[^2]
- Backed by: [HashiCorp](https://talira.ai/orgs/hashicorp.md)
- Funding: acquired by IBM (2025)[^3]

go-version is HashiCorp's Go library for parsing versions and version constraints and checking versions against them. It compares and sorts versions, handles prerelease and build metadata, increments versions, and can strip a known prefix (such as `deployment-`) before parsing. Versions must follow SemVer.

## Links

- GitHub: https://github.com/hashicorp/go-version
- Docs: https://pkg.go.dev/github.com/hashicorp/go-version

## Problems it solves

- check whether a version string satisfies a constraint like '>= 1.2, < 2.0' in Go
- sort a list of release versions correctly in Go, with betas before the final release
- compare two version numbers in a Go CLI to decide whether to update
- parse version tags that carry a prefix like 'deployment-v1.2.3'

## Features

- parse versions and compare them (less than, greater than, equal)
- version constraints such as '>= 1.0, < 1.4'
- sort a collection of versions, prereleases included
- strip a custom prefix before parsing
- increment versions

## Trust

Overall: 0.48 out of 1.
Signals: maintenance 0.48, adoption 0.65, momentum 0.33, community 0.70, backing 0.55, extensibility 0.00.

- last commit 45 days ago
- 5 commits in the last 90 days
- latest release v1.9.0 8 months ago
- 1.8k GitHub stars
- 54 contributors
- backed by HashiCorp
- funding: acquired by IBM (2025)

## Alternatives

- [go-semver](https://talira.ai/catalog/go-semver-8zgwehdg.md): Parse, compare and bump semantic version strings in Go
- [semver (Go)](https://talira.ai/catalog/semver-go-xkfn0mwq.md): Parse, sort and check semantic versions against constraints in Go

## Sources

[^1]: https://github.com/hashicorp/go-version/blob/main/LICENSE (checked 28 Nov 2026)
[^2]: https://github.com/hashicorp/go-version (checked 28 Nov 2026)
[^3]: https://newsroom.ibm.com/2025-02-27-ibm-completes-acquisition-of-hashicorp,-creates-comprehensive,-end-to-end-hybrid-cloud-platform (checked 20 Nov 2026)
