aboutsummaryrefslogtreecommitdiff
path: root/util/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'util/util.go')
-rw-r--r--util/util.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/util/util.go b/util/util.go
new file mode 100644
index 0000000..7164937
--- /dev/null
+++ b/util/util.go
@@ -0,0 +1,14 @@
+package util
+
+import (
+ "regexp"
+)
+
+func IsOnion(url string) bool {
+ re := regexp.MustCompile(`\.onion`)
+ if re.MatchString(url) {
+ return true
+ }
+
+ return false
+}