Update change detection

This commit is contained in:
Svilen Markov
2024-05-30 22:53:59 +01:00
parent 6cad5a8efb
commit 00a93e466d
8 changed files with 140 additions and 84 deletions

View File

@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"net/url"
"regexp"
"slices"
"strings"
)
@@ -77,3 +78,9 @@ func maybeCopySliceWithoutZeroValues[T int | float64](values []T) []T {
return values
}
var urlSchemePattern = regexp.MustCompile(`^[a-z]+:\/\/`)
func stripURLScheme(url string) string {
return urlSchemePattern.ReplaceAllString(url, "")
}