MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / sanitizeURL

Method sanitizeURL

api/pkg/requests/request.go:77–87  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

75}
76
77func (input *request) sanitizeURL(value string) string {
78 value = strings.TrimSpace(value)
79 website, err := url.Parse(value)
80 if err != nil {
81 return value
82 }
83 if website.Scheme == "" {
84 return "https://" + value
85 }
86 return value
87}
88
89func (input *request) sanitizeStringPointer(value string) *string {
90 value = strings.TrimSpace(value)

Callers 1

SanitizeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected