Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/followtheprocess/semver
Semver parsing and validation library for Go
https://github.com/followtheprocess/semver
go semver semver-parser
Last synced: 20 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 (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-11T08:11:53.000Z (2 months ago)
- Last Synced: 2024-10-15T20:37:35.968Z (about 1 month ago)
- Topics: go, semver, semver-parser
- Language: Go
- Homepage:
- Size: 69.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Semver
[![License](https://img.shields.io/github/license/FollowTheProcess/semver)](https://github.com/FollowTheProcess/semver)
[![Go Reference](https://pkg.go.dev/badge/github.com/FollowTheProcess/semver.svg)](https://pkg.go.dev/github.com/FollowTheProcess/semver)
[![Go Report Card](https://goreportcard.com/badge/github.com/FollowTheProcess/semver)](https://goreportcard.com/report/github.com/FollowTheProcess/semver)
[![GitHub](https://img.shields.io/github/v/release/FollowTheProcess/semver?logo=github&sort=semver)](https://github.com/FollowTheProcess/semver)
[![CI](https://github.com/FollowTheProcess/semver/workflows/CI/badge.svg)](https://github.com/FollowTheProcess/semver/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/FollowTheProcess/semver/branch/main/graph/badge.svg?token=Q8Y5KFA9ZK)](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 github.com/FollowTheProcess/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