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

@@ -22,7 +22,7 @@ func newOutOfLineContent(mediaType string, content any) (*OutOfLineContent, erro
return nil, fmt.Errorf("content type %T incompatible with out of line content", content)
}
if !isValidURL(content.(URI)) {
if !isValidURI(content.(URI)) {
return nil, errors.New("content not a valid uri")
}