check another missed error

This commit is contained in:
Shawn Smith
2020-02-11 17:52:54 +09:00
parent 961b4ebe98
commit 0e10c8060f

View File

@@ -119,14 +119,19 @@ func updateReposCount(txn *badger.Txn, repo string) error {
}
if item != nil {
err = item.Value(func(val []byte) error {
err := item.Value(func(val []byte) error {
err = json.Unmarshal(val, &totalInt)
if err != nil {
return fmt.Errorf("could not unmarshal total repos count: %v", err)
}
return nil
})
if err != nil {
return err
}
}
totalInt++ // increase repo count