mirror of
https://github.com/Xevion/glance.git
synced 2025-12-07 11:15:12 -06:00
Update change detection
This commit is contained in:
@@ -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, "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user