chore: upgrade dependencies

This commit is contained in:
yusing
2026-01-30 00:23:21 +08:00
parent 6528fb0a8d
commit 3b0484f4a5
9 changed files with 64 additions and 72 deletions

View File

@@ -115,24 +115,6 @@ func validateURL(args []string) (any, gperr.Error) {
return u, nil
}
// validateAbsoluteURL returns types.URL with the URL validated.
func validateAbsoluteURL(args []string) (any, gperr.Error) {
if len(args) != 1 {
return nil, ErrExpectOneArg
}
u, err := nettypes.ParseURL(args[0])
if err != nil {
return nil, ErrInvalidArguments.With(err)
}
if u.Scheme == "" {
u.Scheme = "http"
}
if u.Host == "" {
return nil, ErrInvalidArguments.Withf("missing host")
}
return u, nil
}
// validateCIDR returns types.CIDR with the CIDR validated.
func validateCIDR(args []string) (any, gperr.Error) {
if len(args) != 1 {