mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
Make extraction of fields optional
This commit is contained in:
parent
41e4029b0d
commit
d6c0fa3518
2 changed files with 22 additions and 7 deletions
|
|
@ -51,8 +51,8 @@ func NewAdvisorySummary(
|
|||
{Expr: titleExpr, Action: util.StringMatcher(&e.Title)},
|
||||
{Expr: currentReleaseDateExpr, Action: util.TimeMatcher(&e.CurrentReleaseDate, time.RFC3339)},
|
||||
{Expr: initialReleaseDateExpr, Action: util.TimeMatcher(&e.InitialReleaseDate, time.RFC3339)},
|
||||
{Expr: summaryExpr, Action: util.StringMatcher(&e.Summary)},
|
||||
{Expr: tlpLabelExpr, Action: util.StringMatcher(&e.TLPLabel)},
|
||||
{Expr: summaryExpr, Action: util.StringMatcher(&e.Summary), Optional: true},
|
||||
{Expr: tlpLabelExpr, Action: util.StringMatcher(&e.TLPLabel), Optional: true},
|
||||
{Expr: publisherExpr, Action: util.ReMarshalMatcher(e.Publisher)},
|
||||
}, doc); err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue