Made URI and IRI conform to the LinkOrUri interface

Added a convenience String method
This commit is contained in:
Marius Orcsik 2018-07-13 10:17:03 +02:00
parent 551072e561
commit 66767f675a
No known key found for this signature in database
GPG key ID: 889CE8E4FB2D877A

View file

@ -7,3 +7,17 @@ type (
// URI is a Uniform Resource Identifier (URI) RFC3986
URI string
)
func (u URI) String() string {
return string(u)
}
func (i IRI) String() string {
return string(i)
}
func (u URI) GetLink() URI {
return u
}
func (i IRI) GetLink() URI {
return URI(i)
}