spiegel/internal/utils/utils.go

20 lines
263 B
Go
Raw Normal View History

2024-05-22 02:59:08 +02:00
package utils
import (
"github.com/sirupsen/logrus"
"regexp"
)
func IsHttpRepo(url string) bool {
regex := "^http.?://.*"
result, err := regexp.Match(regex, []byte(url))
if err != nil {
logrus.Fatal(err)
}
if result {
return true
}
return false
}