From d2277b1f9b17e61456cd312ef54542e1cfa81a40 Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Wed, 27 Oct 2021 18:18:06 -0300 Subject: restructuring, part 1 of many --- util/util.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 util/util.go (limited to 'util/util.go') 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 +} -- cgit v1.2.3