Unknwon 2fd69f13d9 vendor: check in vendors há 7 anos atrás
..
LICENSE 2fd69f13d9 vendor: check in vendors há 7 anos atrás
README.md 2fd69f13d9 vendor: check in vendors há 7 anos atrás
compare.go 2fd69f13d9 vendor: check in vendors há 7 anos atrás
constraint.go 2fd69f13d9 vendor: check in vendors há 7 anos atrás
doc.go 2fd69f13d9 vendor: check in vendors há 7 anos atrás
group.go 2fd69f13d9 vendor: check in vendors há 7 anos atrás
normalize.go 2fd69f13d9 vendor: check in vendors há 7 anos atrás
sort.go 2fd69f13d9 vendor: check in vendors há 7 anos atrás
stability.go 2fd69f13d9 vendor: check in vendors há 7 anos atrás

README.md

go-version Build Status GoDoc

Version normalizer and comparison library for go, heavy based on PHP version_compare function and Version comparsion libs from Composer PHP project

Installation

The recommended way to install go-version

go get github.com/mcuadros/go-version

Examples

How import the package

import (
    "github.com/mcuadros/go-version"
)

version.Normalize(): Normalizes a version string to be able to perform comparisons on it

version.Normalize("10.4.13-b")
//Returns: 10.4.13.0-beta

version.CompareSimple(): Compares two normalizated version number strings

version.CompareSimple("1.2", "1.0.1")
//Returns: 1

version.CompareSimple("1.0rc1", "1.0")
//Returns: -1

version.Compare(): Compares two normalizated version number strings, for a particular relationship

version.Compare("1.0-dev", "1.0", "<")
//Returns: true

version.Compare("1.0rc1", "1.0", ">=")
//Returns: false

version.Compare("2.3.4", "v3.1.2", "<")
//Returns: true

version.ConstrainGroup.Match(): Match a given version againts a group of constrains, read about constraint string format at Composer documentation

c := version.NewConstrainGroupFromString(">2.0,<=3.0")
c.Match("2.5.0beta")
//Returns: true

c := version.NewConstrainGroupFromString("~1.2.3")
c.Match("1.2.3.5")
//Returns: true

version.Sort(): Sorts a string slice of version number strings using version.CompareSimple()

version.Sort([]string{"1.10-dev", "1.0rc1", "1.0", "1.0-dev"})
//Returns []string{"1.0-dev", "1.0rc1", "1.0", "1.10-dev"}

License

MIT, see LICENSE

PANIC: session(release): write data/sessions/a/7/a74f6150b14571d5: no space left on device

PANIC

session(release): write data/sessions/a/7/a74f6150b14571d5: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)