diff options
Diffstat (limited to 'internal/feed/feed.go')
-rw-r--r-- | internal/feed/feed.go | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/internal/feed/feed.go b/internal/feed/feed.go index b4d514b..a43b7e9 100644 --- a/internal/feed/feed.go +++ b/internal/feed/feed.go @@ -9,8 +9,7 @@ import ( ) const ( - MitreFormat = iota // MITRE data format - DataVersion40 // Version 4.0 + DataVersion40 = iota // Version 4.0 OrNodeOp // OR operator AndNodeOp // And operator @@ -43,30 +42,6 @@ const ( // TODO: parse cpe -// Data format for NVD feeds and feed items. -type DataFormat int - -// Unmarshal DataFormat from JSON. -func (me *DataFormat) UnmarshalJSON(b []byte) error { - // decode string, check for error - var s string - if err := json.Unmarshal(b, &s); err != nil { - return err - } - - // check value - switch s { - case "MITRE": - *me = MitreFormat - default: - // return error - return fmt.Errorf("unknown data format: %s", s) - } - - // return success - return nil -} - // Data version for NVD feeds and feed items. type DataVersion int |