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

refactor: replace deprecated ioutil with io and os #423

Merged
merged 2 commits into from
Apr 5, 2023
Merged

refactor: replace deprecated ioutil with io and os #423

merged 2 commits into from
Apr 5, 2023

Conversation

alexandear
Copy link
Contributor

@alexandear alexandear commented Apr 4, 2023

This PR replaces deprecated in Go 1.16 io/ioutil package with io and os.

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

Replace was done with the help of gofmt and goimports tools:

gofmt -r 'ioutil.WriteFile -> os.WriteFile' -w .
gofmt -r 'ioutil.Discard -> io.Discard' -w .
gofmt -r 'ioutil.ReadAll -> io.ReadAll' -w .
goimports -w .

Changed ioutil.TempDir to t.TempDir in tests.

Sorry, something went wrong.

@CLAassistant
Copy link

CLAassistant commented Apr 4, 2023

CLA assistant check
All committers have signed the CLA.

@alexandear alexandear changed the title all: replace deprecated ioutil with io and os refactor: replace deprecated ioutil with io and os Apr 4, 2023
@alnr
Copy link
Contributor

alnr commented Apr 4, 2023

Hey thanks! Would you mind bumping the runc dependency, too? That oughta make the pipeline green.

@zepatrik
Copy link
Member

zepatrik commented Apr 4, 2023

@alnr see sonatype-nexus-community/nancy#273

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@zepatrik zepatrik merged commit 1b74b04 into ory:v3 Apr 5, 2023
@alexandear alexandear deleted the remove-deprecated-ioutil branch April 5, 2023 08:00
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.

None yet

4 participants