# go-semver

> Parse, compare and bump semantic version strings in Go

Source: https://talira.ai/catalog/go-semver-8zgwehdg
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)
- Platforms: linux, macos, windows[^2]
- Licence: Apache-2.0[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [CoreOS](https://talira.ai/orgs/coreos.md)

go-semver is a small Go library from CoreOS for semantic versions. It parses version strings into a Version with major, minor, patch, pre-release and metadata parts, compares and sorts them (pre-release identifiers included), and bumps the major, minor or patch number. A Version also works as a command-line flag value and marshals to and from JSON and YAML.

## Links

- GitHub: https://github.com/coreos/go-semver
- Docs: https://pkg.go.dev/github.com/coreos/go-semver/semver

## Problems it solves

- compare two version strings correctly in my Go program
- sort a list of release versions in Go, with pre-releases in the right order
- bump the patch or minor version of a release from a Go tool

## Features

- Parses semantic version strings, with pre-release and metadata parts
- Compare, Equal and LessThan, with pre-release precedence
- Sorts lists of versions
- BumpMajor, BumpMinor and BumpPatch
- Works as a flag.Value and marshals to JSON and YAML

## Trust

Overall: 0.31 out of 1.
Signals: maintenance 0.27, adoption 0.51, momentum 0.16, community 0.57, backing 0.30, extensibility 0.00.

- 367 GitHub stars
- 25 contributors
- backed by CoreOS

Warnings:

- last commit 9 months ago

## Alternatives

- [go-version](https://talira.ai/catalog/go-version-zmf5dep4.md): A Go library for parsing and verifying versions and version constraints
- [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/coreos/go-semver/blob/main/LICENSE (checked 28 Nov 2026)
[^2]: https://github.com/coreos/go-semver/blob/main/README.md (checked 28 Nov 2026)
