Remove unused stuff
This commit is contained in:
parent
4220a2acc6
commit
03ec0d2ddf
18
atom.go
18
atom.go
@ -12,25 +12,9 @@ type (
|
|||||||
EmailAddress string
|
EmailAddress string
|
||||||
LanguageTag string
|
LanguageTag string
|
||||||
MediaType 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:)(?<nid>[a-z0-9][a-z0-9-]{1,31}):(?<nss>(?:[-a-z0-9()+,.:=@;$_!*'&~\/]|%[0-9a-f]{2})+)(?:\?\+(?<rcomponent>.*?))?(?:\?=(?<qcomponent>.*?))?(?:#(?<fcomponent>.*?))?)\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.
|
// isValidIRI checks whether an IRI is valid or not. It returns a bool.
|
||||||
// The used pattern stems from
|
// The used pattern stems from
|
||||||
// https://www.w3.org/2011/04/XMLSchema/TypeLibrary-IRI-RFC3987.xsd.
|
// https://www.w3.org/2011/04/XMLSchema/TypeLibrary-IRI-RFC3987.xsd.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user