Skip to content

Conversation

@luispresuelVenafi
Copy link
Contributor

  • Migrates from deprecated library ioutil
  • Handles errors that missed handling

if err != nil {
panic(err)
}
buf, err := io.ReadAll(file)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also need to call Close in defer:

defer func() {
    err = file.Close()
}()

On the other places where we call .Open as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants