diff options
author | Paul Duncan <pabs@pablotron.org> | 2022-01-31 17:09:28 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2022-01-31 17:09:28 -0500 |
commit | 08cd2d3e893e4f1298110594ca168e366a38d5aa (patch) | |
tree | 5039fc8017dddcffaddcee40b2d8682eb0989800 /main.go | |
parent | 80407c0ee1ddd7d8d981e9d87139629d924d707e (diff) | |
download | cvez-08cd2d3e893e4f1298110594ca168e366a38d5aa.tar.bz2 cvez-08cd2d3e893e4f1298110594ca168e366a38d5aa.zip |
add internal/feed/meta_test.go
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 28 |
1 files changed, 1 insertions, 27 deletions
@@ -1,7 +1,6 @@ package main import ( - "bytes" "encoding/json" "fmt" "log" @@ -10,31 +9,6 @@ import ( "os" ) -const testMeta = `lastModifiedDate:2022-01-29T03:01:16-05:00 -size:73202582 -zipSize:3753799 -gzSize:3753663 -sha256:B86258D5D9861507A1894A7B92011764803D7267787B1487539E240EA2405440 -` - -// Test meta parser -func testMetaParser() { - // create buffer - buf := bytes.NewBufferString(testMeta) - - // decode meta, check for error - meta, err := feed.NewMeta(buf) - if err != nil { - log.Fatal(err) - } - - // create json encoder - e := json.NewEncoder(os.Stdout) - if err := e.Encode(meta); err != nil { - log.Fatal(err) - } -} - // Test feed parser func testFeedParser() { var f feed.Feed @@ -83,7 +57,7 @@ func testCvssV2Parser() { } func main() { - testMetaParser() + // testMetaParser() // testFeedParser() testCvssV3Parser() testCvssV2Parser() |