spiegel/internal/utils/utils.go
2024-05-22 03:07:33 +02:00

20 lines
262 B
Go

package utils
import (
"regexp"
"github.com/sirupsen/logrus"
)
func IsHTTPRepo(url string) bool {
regex := "^http.?://.*"
result, err := regexp.MatchString(regex, url)
if err != nil {
logrus.Fatal(err)
}
if result {
return true
}
return false
}