Create isValidURN and isValidURI and use isValidURI everywhere where it is needed

This commit is contained in:
2024-10-16 16:48:44 +02:00
parent 14696371e2
commit c200d5bf73
4 changed files with 20 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ func (p *Person) Check() error {
}
if p.URI != "" {
if !isValidURL(p.URI) {
if !isValidURI(p.URI) {
return fmt.Errorf("uri element of person %v not correctly formatted", p.Name)
}
}