Skip to content

Commit

Permalink
Add another missing close
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed Sep 20, 2023
1 parent 39bbb2f commit 8f0e366
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions initialization/migrate_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ func migrateV0(dir string, logger *zap.Logger) (err error) {
return fmt.Errorf("failed to determine metadata version: %w", err)
}

Check warning on line 105 in initialization/migrate_metadata.go

View check run for this annotation

Codecov / codecov/patch

initialization/migrate_metadata.go#L104-L105

Added lines #L104 - L105 were not covered by tests

if err := file.Close(); err != nil {
return fmt.Errorf("failed to close metadata file: %w", err)
}

Check warning on line 109 in initialization/migrate_metadata.go

View check run for this annotation

Codecov / codecov/patch

initialization/migrate_metadata.go#L108-L109

Added lines #L108 - L109 were not covered by tests

if len(old.NodeId) != 32 {
return fmt.Errorf("invalid node ID length: %d", len(old.NodeId))
}

Check warning on line 113 in initialization/migrate_metadata.go

View check run for this annotation

Codecov / codecov/patch

initialization/migrate_metadata.go#L112-L113

Added lines #L112 - L113 were not covered by tests
Expand Down

0 comments on commit 8f0e366

Please sign in to comment.