Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a linter error causing lack of compilation in Go 1.19 #439

Merged
merged 1 commit into from
Jan 20, 2023
Merged

Fixed a linter error causing lack of compilation in Go 1.19 #439

merged 1 commit into from
Jan 20, 2023

Conversation

freeone3000
Copy link
Contributor

Fixed a linter error causing build to fail in Go 1.19 by removing deprecated io/ioutil functions and replacing them with their Go 1.16 counterparts.

This PR fixes #438

Checklist

  • I have signed the CLA
  • I have updated/added any relevant documentation

Description

What's the goal of this PR?

To allow compilation using Go 1.19, by replacing deprecated Go functions with their counterparts.

What changes did you make?

I changed "io/ioutil".ReadFile to os.ReadFile and "io/ioutil".ReadAll to os.ReadAll for all occurrences.

What alternative solution should we consider, if any?

If backwards compatibility with Go versions prior to 1.16 is important for this project, a solution which vendors the dependency with version-specific calls should be favoured.

…ng deprecated io/ioutil functions and replacing them with their Go 1.16 counterparts.
@CLAassistant
Copy link

CLAassistant commented Jan 20, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@sudermanjr sudermanjr left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@sudermanjr sudermanjr merged commit 4c80d3a into FairwindsOps:master Jan 20, 2023
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.

Go 1.16 Deprecates IOUtil; lint fails build
3 participants