Compare commits

...

2 Commits

Author SHA1 Message Date
2e97859b87 Remove old dependency on x/exp/slices in favor of stdlib 2025-09-12 22:09:49 +02:00
6718928860 Add README 2023-10-03 20:39:44 +00:00
5 changed files with 7 additions and 9 deletions

4
README.md Normal file
View File

@@ -0,0 +1,4 @@
# vercmp
[![Go Reference](https://pkg.go.dev/badge/go.elara.ws/vercmp.svg)](https://pkg.go.dev/go.elara.ws/vercmp)
This is a simple library that compares two versions using an algorithm loosely based on the `rpmvercmp` algorithm.

4
go.mod
View File

@@ -1,5 +1,3 @@
module go.elara.ws/vercmp
go 1.20
require golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
go 1.21

2
go.sum
View File

@@ -1,2 +0,0 @@
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=

View File

@@ -3,10 +3,9 @@
package vercmp
import (
"slices"
"strconv"
"strings"
"golang.org/x/exp/slices"
)
// Compare compares two version strings.

View File

@@ -1,9 +1,8 @@
package vercmp
import (
"slices"
"testing"
"golang.org/x/exp/slices"
)
func TestSepLabel(t *testing.T) {