import "github.com/haya14busa/go-versionsort"
func ExampleVersionSort() {
strs := []string{
"v1.1",
"v1.10",
"v1.11",
"v1.9",
"v1.8",
}
versionsort.Sort(strs, false)
for _, s := range strs {
fmt.Println(s)
}
// Output:
// v1.1
// v1.8
// v1.9
// v1.10
// v1.11
}
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Sort in natural version order like sort -V
License
haya14busa/go-versionsort
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Sort in natural version order like sort -V
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published