mirror of
https://github.com/1f349/site-hosting.git
synced 2025-04-13 23:26:02 +01:00
Remove duplicated '-' check
This commit is contained in:
parent
6897df5cd5
commit
fee7ed1e28
@ -4,10 +4,6 @@ func IsValidSite(site string) bool {
|
|||||||
if len(site) < 1 || site[0] == '-' {
|
if len(site) < 1 || site[0] == '-' {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
switch site[0] {
|
|
||||||
case '-':
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return containsOnly(site, func(r rune) bool {
|
return containsOnly(site, func(r rune) bool {
|
||||||
return isAlphanumericOrDash(r) || r == '.'
|
return isAlphanumericOrDash(r) || r == '.'
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user