Update code.gitea.io/git (#3137)
This commit is contained in:
parent
682ac11958
commit
58a7de2aea
31 changed files with 3274 additions and 405 deletions
4
vendor/github.com/mcuadros/go-version/README.md
generated
vendored
4
vendor/github.com/mcuadros/go-version/README.md
generated
vendored
|
@ -1,4 +1,4 @@
|
|||
go-version [](https://travis-ci.org/mcuadros/go-version) [](http://godoc.org/github.com/mcuadros/go-version)
|
||||
go-version [](https://travis-ci.org/mcuadros/go-version) [](http://godoc.org/github.com/mcuadros/go-version)
|
||||
==============================
|
||||
|
||||
Version normalizer and comparison library for go, heavy based on PHP version_compare function and Version comparsion libs from [Composer](https://github.com/composer/composer) PHP project
|
||||
|
@ -78,5 +78,3 @@ License
|
|||
-------
|
||||
|
||||
MIT, see [LICENSE](LICENSE)
|
||||
|
||||
[](https://bitdeli.com/free "Bitdeli Badge")
|
||||
|
|
14
vendor/github.com/mcuadros/go-version/compare.go
generated
vendored
14
vendor/github.com/mcuadros/go-version/compare.go
generated
vendored
|
@ -23,6 +23,8 @@ var specialForms = map[string]int{
|
|||
"pl": 1,
|
||||
}
|
||||
|
||||
var unknownForm int = -7
|
||||
|
||||
// Compares two version number strings, for a particular relationship
|
||||
//
|
||||
// Usage
|
||||
|
@ -155,5 +157,15 @@ func numVersion(value string) int {
|
|||
return special
|
||||
}
|
||||
|
||||
return -7
|
||||
return unknownForm
|
||||
}
|
||||
|
||||
func ValidSimpleVersionFormat(value string) bool {
|
||||
normalized := Normalize(value)
|
||||
for _, component := range prepVersion(normalized) {
|
||||
if numVersion(component) == unknownForm {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue