(value string)
| 169 | } |
| 170 | |
| 171 | func IsURL(value string) (bool, string, string) { |
| 172 | parsedURL, err := url.ParseRequestURI(value) |
| 173 | if err != nil { |
| 174 | return false, value, "is an invalid URL" |
| 175 | } |
| 176 | |
| 177 | if parsedURL.Scheme != "http" && parsedURL.Scheme != "https" { |
| 178 | return false, value, "must use \"http\" or \"https\" scheme" |
| 179 | } |
| 180 | |
| 181 | return true, value, "" |
| 182 | } |
| 183 | |
| 184 | func IsChecked(value string) (bool, string, string) { |
| 185 | if value != "true" { |
nothing calls this directly
no outgoing calls
no test coverage detected