forked from forgejo/forgejo
Update code.gitea.io/git (#3137)
This commit is contained in:
parent
682ac11958
commit
58a7de2aea
31 changed files with 3274 additions and 405 deletions
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