Skip to content

Commit 02edd8f

Browse files
authored
Initial release (#1)
* Initial release Signed-off-by: Kimmo Lehto <[email protected]>
1 parent 70bba18 commit 02edd8f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# version
22

3-
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.
3+
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.
44

55
## Usage
66

collection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "fmt"
77
type Collection []*Version
88

99
func NewCollection(versions ...string) (Collection, error) {
10-
c := make(Collection, len(versions), len(versions))
10+
c := make(Collection, len(versions))
1111
for i, v := range versions {
1212
nv, err := NewVersion(v)
1313
if err != nil {

version_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ func TestNewVersion(t *testing.T) {
1010
v, err := NewVersion("1.23.3+k0s.1")
1111
assert.NoError(t, err)
1212
assert.Equal(t, "1.23.3+k0s.1", v.String())
13-
v, err = NewVersion("1.23.b+k0s.1")
13+
_, err = NewVersion("1.23.b+k0s.1")
1414
assert.Error(t, err)
1515
}
1616

0 commit comments

Comments
 (0)