Delete extensionAttribute.go and simplify undefined attributes
This commit is contained in:
6
atom.go
6
atom.go
@@ -82,6 +82,12 @@ func isValidLanguageTag(tag LanguageTag) bool {
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// isValidAttribute checks whether an Attribute is valid. It returns a bool.
|
||||
func isValidAttribute(attribute string) bool {
|
||||
regex := regexp.MustCompile(`^[a-zA-Z0-9_]+="[^"]*"$`)
|
||||
return regex.MatchString(attribute)
|
||||
}
|
||||
|
||||
// NewURN generates an new valid IRI based on a UUID. It returns an IRI.
|
||||
func NewURN() IRI {
|
||||
return IRI(fmt.Sprint("urn:uuid:", uuid.New()))
|
||||
|
Reference in New Issue
Block a user