1 2 3 4 5 6 7 8 9 10 11 12 13 14
package util import ( "regexp" ) func IsOnion(url string) bool { re := regexp.MustCompile(`\.onion`) if re.MatchString(url) { return true } return false }