mirror of
https://github.com/pikami/tiktok-dl.git
synced 2026-01-08 12:05:38 +00:00
formatter
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user