aboutsummaryrefslogtreecommitdiff
path: root/util/util.go
diff options
context:
space:
mode:
authorKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-11-02 16:10:57 -0300
committerFChannel <>2022-06-19 12:53:29 -0700
commitbc9051fd1a17e793647cf309c973a7feefebd98f (patch)
treebf16a2176e9129c3921ef6743a6c22781e744064 /util/util.go
parentd80afd8a49f552c5dc51d8346d40809298fef11f (diff)
down to the main package it seems
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
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
+}