api: standardise strip fn names
This commit is contained in:
@@ -8,7 +8,7 @@ var prePlusMatch = regexp.MustCompile(`([^@\+]*)\+?(.*)@.*`)
|
||||
var periodsMatch = regexp.MustCompile(`[\.]`)
|
||||
var postAtMatch = regexp.MustCompile(`[^@]*(@.*)`)
|
||||
|
||||
func stripEmail(email string) string {
|
||||
func emailStrip(email string) string {
|
||||
postAt := postAtMatch.ReplaceAllString(email, `$1`)
|
||||
prePlus := prePlusMatch.ReplaceAllString(email, `$1`)
|
||||
strippedEmail := periodsMatch.ReplaceAllString(prePlus, ``) + postAt
|
||||
@@ -19,7 +19,7 @@ func stripEmail(email string) string {
|
||||
var https = regexp.MustCompile(`(https?://)`)
|
||||
var trailingSlash = regexp.MustCompile(`(/*$)`)
|
||||
|
||||
func stripDomain(domain string) string {
|
||||
func domainStrip(domain string) string {
|
||||
noSlash := trailingSlash.ReplaceAllString(domain, ``)
|
||||
noProtocol := https.ReplaceAllString(noSlash, ``)
|
||||
|
||||
@@ -28,7 +28,7 @@ func stripDomain(domain string) string {
|
||||
|
||||
var pathMatch = regexp.MustCompile(`(https?://[^/]*)`)
|
||||
|
||||
func stripPath(url string) string {
|
||||
func pathStrip(url string) string {
|
||||
strippedPath := pathMatch.ReplaceAllString(url, ``)
|
||||
|
||||
return strippedPath
|
||||
|
||||
Reference in New Issue
Block a user