verstr

package
v0.0.0-...-d8f7d12 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 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