Change URI to IRI after finding validation pattern
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
type Generator struct {
|
||||
*CommonAttributes
|
||||
URI URI `xml:"uri,attr,omitempty"`
|
||||
URI IRI `xml:"uri,attr,omitempty"`
|
||||
Version string `xml:"version,attr,omitempty"`
|
||||
Text string `xml:"text"`
|
||||
}
|
||||
@@ -19,7 +19,7 @@ func NewGenerator(text string) *Generator {
|
||||
|
||||
func (g *Generator) Check() error {
|
||||
if g.URI != "" {
|
||||
if !isValidURI(g.URI) {
|
||||
if !isValidIRI(g.URI) {
|
||||
return fmt.Errorf("uri attribute %v of generator not correctly formatted", g.URI)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user