mirror of
https://github.com/beclab/Olares
synced 2026-05-20 15:28:24 +00:00
14 lines
228 B
Go
14 lines
228 B
Go
package utils
|
|
|
|
import (
|
|
"regexp"
|
|
)
|
|
|
|
func CheckUrl(val string) bool {
|
|
regex := `^(https://)([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$`
|
|
re := regexp.MustCompile(regex)
|
|
if ok := re.MatchString(val); !ok {
|
|
return false
|
|
}
|
|
return true
|
|
}
|