From bc9051fd1a17e793647cf309c973a7feefebd98f Mon Sep 17 00:00:00 2001
From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>
Date: Tue, 2 Nov 2021 16:10:57 -0300
Subject: down to the main package it seems

---
 util/util.go | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

(limited to 'util')

diff --git a/util/util.go b/util/util.go
index 4ac8267..5ee548e 100644
--- a/util/util.go
+++ b/util/util.go
@@ -2,6 +2,7 @@ package util
 
 import (
 	"regexp"
+	"strings"
 )
 
 func IsOnion(url string) bool {
@@ -49,3 +50,16 @@ func GetActorInstance(path string) (string, string) {
 
 	return "", ""
 }
+
+func GetActorFollowNameFromPath(path string) string {
+	var actor string
+
+	re := regexp.MustCompile("f\\w+-")
+
+	actor = re.FindString(path)
+
+	actor = strings.Replace(actor, "f", "", 1)
+	actor = strings.Replace(actor, "-", "", 1)
+
+	return actor
+}
-- 
cgit v1.2.3