// isURL returns true if the provided value appears to be a valid URL.
421206
func (a *Addr) isURL(value string) bool {
	prefixes := urlPrefixes
	if a.DefaultScheme != "" {
		prefixes = append(prefixes, fmt.Sprintf("%s://", a.DefaultScheme))
	}
	for _, p := range prefixes {
		if strings.HasPrefix(value, p) {
			return true
		}
	}
	return false
}
757160
func (s *StaticKeyProvider) SetUrl(v string) *StaticKeyProvider {
	s.Url = &v
	return s
}
1190114
func (b Base) URL(styles ...string) string {
	if b.Url != "" && len(styles) > 0 {
		ext := path.Ext(b.Url)
		return fmt.Sprintf("%v.%v%v", strings.TrimSuffix(b.Url, ext), styles[0], ext)
	}
	return b.Url
}
1332422
func (i *Issue) GetURL() string {
	if i == nil || i.URL == nil {
		return ""
	}
	return *i.URL
}
783293
func isURLOrHostPort(s string) bool {
	return strings.HasPrefix(s, "http://") ||
		strings.HasPrefix(s, "https://") ||
		strings.Contains(s, ".") || strings.Contains(s, ":")
}
287841
func (a *SetCookieArgs) SetURL(url string) *SetCookieArgs {
	a.URL = &url
	return a
}
1288604
func (r *Request) URL() *url.URL {
	p := r.pathPrefix
	if r.namespaceSet && len(r.namespace) > 0 {
		p = path.Join(p, "namespaces", r.namespace)
	}
	if len(r.resource) != 0 {
		p = path.Join(p, strings.ToLower(r.resource))
	}
	// Join trims trailing slashes, so preserve r.pathPrefix's trailing slash for backwards compat if nothing was changed
	if len(r.resourceName) != 0 || len(r.subpath) != 0 || len(r.subresource) != 0 {
		p = path.Join(p, r.resourceName, r.subresource, r.subpath)
	}

	finalURL := &url.URL{}
	if r.baseURL != nil {
		*finalURL = *r.baseURL
	}
	finalURL.Path = p

	query := url.Values{}
	for key, values := range r.params {
		for _, value := range values {
			query.Add(key, value)
		}
	}

	// timeout is handled specially here.
	if r.timeout != 0 {
		query.Set("timeout", r.timeout.String())
	}
	finalURL.RawQuery = query.Encode()
	return finalURL
}
73098
func (r *Reference) GetURL() string {
	if r == nil || r.URL == nil {
		return ""
	}
	return *r.URL
}
1356164
func (s *ADMMessage) SetUrl(v string) *ADMMessage {
	s.Url = &v
	return s
}
1035018
func (s *InputSource) SetUrl(v string) *InputSource {
	s.Url = &v
	return s
}
385193
func (r *Store) URL() string {
	if r.url == nil {
		return ""
	}
	return r.url.String()
}
631403
func (c *Clair) url(pathTemplate string, args ...interface{}) string {
	pathSuffix := fmt.Sprintf(pathTemplate, args...)
	url := fmt.Sprintf("%s%s", c.URL, pathSuffix)
	return url
}
1129417
func IsAbsURL(path string) bool {
	url, err := url.Parse(path)
	if err != nil {
		return false
	}

	return url.IsAbs() || strings.HasPrefix(path, "//")
}
238425
func ValidateURL(value string) error {
	if _, err := url.Parse(value); err != nil {
		return err
	}
	return nil
}
639966
func (s *InputDestination) SetUrl(v string) *InputDestination {
	s.Url = &v
	return s
}
1125777
func (s *ListWebhookItem) SetUrl(v string) *ListWebhookItem {
	s.Url = &v
	return s
}
475049
func (otp *TOTP) URL(label string) string {
	return otp.OATH.URL(otp.Type(), label)
}