all: Bunch of more linter fixes (#5500)

This commit is contained in:
Jakob Borg
2019-02-02 11:02:28 +01:00
committed by GitHub
parent 2111386ee4
commit df5c1eaf01
30 changed files with 118 additions and 117 deletions

View File

@@ -23,13 +23,17 @@ func writeJSONS(w io.Writer, db *leveldb.DB) {
defer it.Release()
enc := json.NewEncoder(w)
for it.Next() {
enc.Encode(map[string][]byte{
_ = enc.Encode(map[string][]byte{
"k": it.Key(),
"v": it.Value(),
})
}
}
// we know this function isn't generally used, nonetheless we want it in
// here and the linter to not complain.
var _ = writeJSONS
// openJSONS reads a JSON stream file into a leveldb.DB
func openJSONS(file string) (*leveldb.DB, error) {
fd, err := os.Open(file)
@@ -50,7 +54,7 @@ func openJSONS(file string) (*leveldb.DB, error) {
return nil, err
}
db.Put(row["k"], row["v"], nil)
_ = db.Put(row["k"], row["v"], nil)
}
return db, nil