mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Enforce error handling and checking type assertions (#5403)
* Enforce error handling and checking type assertions * Reference issue #5404 in the TODO message * doc description * Merge branch 'master' into errcheck * fix tests and address @nisdas feedbacK * gaz * fix docker image
This commit is contained in:
@@ -57,7 +57,11 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to create file at %s: %v", os.Args[2], err)
|
||||
}
|
||||
defer outFile.Close()
|
||||
defer func() {
|
||||
if err := outFile.Close(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}()
|
||||
if err := keygen.SaveUnencryptedKeysToFile(outFile, out); err != nil {
|
||||
log.Fatalf("Failed to save %v", err)
|
||||
}
|
||||
|
||||
@@ -26,7 +26,11 @@ func main() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer d.Close()
|
||||
defer func() {
|
||||
if err := d.Close(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}()
|
||||
gs, err := d.GenesisState(context.Background())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
Reference in New Issue
Block a user