stash/pkg/performer/url.go

19 lines
365 B
Go
Raw Permalink Normal View History

package performer
import (
"regexp"
)
var (
twitterURLRE = regexp.MustCompile(`^https?:\/\/(?:www\.)?twitter\.com\/`)
instagramURLRE = regexp.MustCompile(`^https?:\/\/(?:www\.)?instagram\.com\/`)
)
func IsTwitterURL(url string) bool {
return twitterURLRE.MatchString(url)
}
func IsInstagramURL(url string) bool {
return instagramURLRE.MatchString(url)
}