Passed
Push — main ( add42e...815f74 )
by Rushan
02:28 queued 12s
created

is/web.go   A

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A is.URL 0 2 1
1
package is
2
3
import "github.com/muonsoft/validation/validate"
4
5
// URL is used to check that value is a valid URL string. By default (if no schemas are passed),
6
// the function checks only for the http:// and https:// schemas. Use the schemas argument
7
// to configure the list of expected schemas. If an empty string is passed as a schema, then
8
// URL value may be treated as relative (without schema, e.g. "//example.com").
9
func URL(value string, schemas ...string) bool {
10
	return validate.URL(value, schemas...) == nil
11
}
12