Skip to content

Commit

Permalink
Initial release (#1)
Browse files Browse the repository at this point in the history
* Initial release

Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
  • Loading branch information
kke authored Feb 7, 2022
1 parent 70bba18 commit 02edd8f
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# version

A go-language package for managing [k0s](https://github.com/k0sproject/k0s) version numbers. It is based on [hashicorp/go-version](https://github.com/hashicorp/go-version) but adds sorting and comparison capabilities for the k0s version numbering scheme.
A go-language package for managing [k0s](https://github.com/k0sproject/k0s) version numbers. It is based on [hashicorp/go-version](https://github.com/hashicorp/go-version) but adds sorting and comparison capabilities for the k0s version numbering scheme which requires additional sorting by the build tag.

## Usage

2 changes: 1 addition & 1 deletion collection.go
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import "fmt"
type Collection []*Version

func NewCollection(versions ...string) (Collection, error) {
c := make(Collection, len(versions), len(versions))
c := make(Collection, len(versions))
for i, v := range versions {
nv, err := NewVersion(v)
if err != nil {
2 changes: 1 addition & 1 deletion version_test.go
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ func TestNewVersion(t *testing.T) {
v, err := NewVersion("1.23.3+k0s.1")
assert.NoError(t, err)
assert.Equal(t, "1.23.3+k0s.1", v.String())
v, err = NewVersion("1.23.b+k0s.1")
_, err = NewVersion("1.23.b+k0s.1")
assert.Error(t, err)
}

0 comments on commit 02edd8f

Please sign in to comment.