1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Merge branch 'main' into rolie-categories

This commit is contained in:
Sascha L. Teichmann 2022-06-29 14:38:49 +02:00
commit ed2df66ce6
4 changed files with 61 additions and 4 deletions

View file

@ -318,6 +318,24 @@ func (a *Aggregator) Validate() error {
return nil
}
// UnmarshalText implements the encoding.TextUnmarshaller interface.
func (mdv *MetadataVersion) UnmarshalText(data []byte) error {
s, err := metadataVersionPattern(data)
if err == nil {
*mdv = MetadataVersion(s)
}
return err
}
// UnmarshalText implements the encoding.TextUnmarshaller interface.
func (mdr *MetadataRole) UnmarshalText(data []byte) error {
s, err := metadataRolePattern(data)
if err == nil {
*mdr = MetadataRole(s)
}
return err
}
// UnmarshalText implements the encoding.TextUnmarshaller interface.
func (ac *AggregatorCategory) UnmarshalText(data []byte) error {
s, err := aggregatorCategoryPattern(data)