formatter

This commit is contained in:
alexpin
2020-02-25 01:01:10 +02:00
parent f724f0f2a2
commit b6bb470064
10 changed files with 212 additions and 212 deletions

View File

@@ -1,16 +1,16 @@
package utils
import (
res "../resources"
"fmt"
"strings"
res "../resources"
"fmt"
"strings"
)
// GetHashtagFromURL - Get's tag name from passed url
func GetHashtagFromURL(str string) string {
if match := strings.Contains(str, "/tag/"); match {
return strings.Split(str, "/tag/")[1]
}
if match := strings.Contains(str, "/tag/"); match {
return strings.Split(str, "/tag/")[1]
}
panic(fmt.Sprintf(res.ErrorCouldNotRecogniseURL, str))
panic(fmt.Sprintf(res.ErrorCouldNotRecogniseURL, str))
}