cmd/gendb: delete unused matchesCurrent
Running staticcheck found that matchesCurrent is unsed, so the function
is deleted.
Staticccheck error:
cmd/gendb/main.go:32:6: func matchesCurrent is unused (U1000)
Change-Id: I36d36e9ceebf09abd70712e824ba0247852491ab
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/356172
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
diff --git a/cmd/gendb/main.go b/cmd/gendb/main.go
index 065df03..659bebf 100644
--- a/cmd/gendb/main.go
+++ b/cmd/gendb/main.go
@@ -11,7 +11,6 @@
"io/ioutil"
"os"
"path/filepath"
- "reflect"
"strings"
"golang.org/x/vulndb/internal/report"
@@ -29,18 +28,6 @@
// be the prefix for that.
const dbURL = "https://go.googlesource.com/vulndb/+/refs/heads/master/reports/"
-func matchesCurrent(path string, new []osv.Entry) bool {
- var current []osv.Entry
- content, err := ioutil.ReadFile(path + ".json")
- if err != nil {
- return false
- }
- if err := json.Unmarshal(content, ¤t); err != nil {
- return false
- }
- return reflect.DeepEqual(current, new)
-}
-
func main() {
yamlDir := flag.String("reports", "reports", "Directory containing yaml reports")
jsonDir := flag.String("out", "out", "Directory to write JSON database to")