diff --git a/atom.go b/atom.go index 0a11cb1..59ea2df 100644 --- a/atom.go +++ b/atom.go @@ -12,25 +12,9 @@ type ( EmailAddress string LanguageTag string MediaType string - // URI string - IRI string + IRI string ) -// func isValidURL(uri URI) bool { -// _, err := url.ParseRequestURI(string(uri)) -// return err == nil -// } -// -// func isValidURN(uri URI) bool { -// pattern := `\A(?i:urn:(?!urn:)(?[a-z0-9][a-z0-9-]{1,31}):(?(?:[-a-z0-9()+,.:=@;$_!*'&~\/]|%[0-9a-f]{2})+)(?:\?\+(?.*?))?(?:\?=(?.*?))?(?:#(?.*?))?)\z` -// return regexp.MustCompile(pattern).MatchString(string(uri)) -// } -// -// // isValidURI checks whether an URI is valid or not. -// func isValidURI(uri URI) bool { -// return isValidURL(uri) || isValidURN(uri) -// } - // isValidIRI checks whether an IRI is valid or not. It returns a bool. // The used pattern stems from // https://www.w3.org/2011/04/XMLSchema/TypeLibrary-IRI-RFC3987.xsd.