https://github.com/followtheprocess/semver
Semver parsing and validation library for Go
https://github.com/followtheprocess/semver
go semver semver-parser
Last synced: 11 days ago
JSON representation
Semver parsing and validation library for Go
- Host: GitHub
- URL: https://github.com/followtheprocess/semver
- Owner: FollowTheProcess
- License: mit
- Created: 2022-10-29T15:10:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-20T12:13:59.000Z (26 days ago)
- Last Synced: 2025-06-20T13:27:04.595Z (26 days ago)
- Topics: go, semver, semver-parser
- Language: Go
- Homepage:
- Size: 87.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Semver
[](https://github.com/FollowTheProcess/semver)
[](https://pkg.go.dev/go.followtheprocess.codes/semver)
[](https://goreportcard.com/report/github.com/FollowTheProcess/semver)
[](https://github.com/FollowTheProcess/semver)
[](https://github.com/FollowTheProcess/semver/actions?query=workflow%3ACI)
[](https://codecov.io/gh/FollowTheProcess/semver)Semver parsing and validation library for Go
* Free software: MIT License
## Project Description
Semver is a small, simple [semver] parsing and validation library for Go
## Installation
```shell
go get go.followtheprocess.codes/semver@latest
```## Quickstart
### Create a New Version
```go
version := semver.New(1, 2, 3, "rc.1", "build.123")
```### Parse a Version from text
```go
version, err := semver.Parse("v1.6.12")
if err != nil {
log.Fatal(err)
}
```### Check a version string
```go
ok := semver.IsValid("1.19.0")
```### Credits
This package was created with [copier] and the [FollowTheProcess/go_copier] project template.
[copier]: https://copier.readthedocs.io/en/stable/
[FollowTheProcess/go_copier]: https://github.com/FollowTheProcess/go_copier
[semver]: https://semver.org