spiegel/internal/utils/utils.go
Ada f47bbeaaea
Some checks failed
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/lint Pipeline failed
Support ssh clone
2024-05-22 03:01:10 +02:00

19 lines
263 B
Go

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
}