formatter

This commit is contained in:
alexpin committed 2020-02-25 01:01:10 +02:00
1 parent f724f0f2a2
commit b6bb470064
10 files changed
+212 -212

No files matched your search

+7 -7
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))
}