verstr

package
v0.0.0-...-63c3a42 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package verstr supports comparing and sorting of version strings.

Version strings contain substrings of numbers which should be sorted numerically rather than lexographically. For example, "file.9.ext" and "file.10.ext" sort lexographically such that "file.10.ext" comes first which is generally not the desired result. When treated as version strings, "file.9.ext" should come first.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Less

func Less(left, right string) bool

Less compares two version strings and returns true if left should be considered lesser than right.

func Sort

func Sort(list []string)

Sort sorts a slice of strings in-place, treating them as version strings.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL