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

Remove deprecated ioutil and unused function #70

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

lucacome
Copy link
Contributor

@lucacome lucacome commented Nov 6, 2024

This pull request includes several changes to the main.go file, focusing on code cleanup and improvements to file handling. The most important changes include removing an unused function, replacing deprecated functions, and improving code readability.

Code cleanup and improvements:

  • Removed the unused getenvInt function.
  • Replaced deprecated ioutil.ReadFile and ioutil.WriteFile with os.ReadFile and os.WriteFile respectively for better performance and future compatibility. [1] [2]
  • Consolidated the os.OpenFile call into a single line for improved readability.

File handling improvements:

  • Updated the setGithubEnvOutput function to use fmt.Fprintf for writing to the file, enhancing clarity and performance.

@lucacome lucacome force-pushed the remove-ioutil branch 3 times, most recently from 6faaeaf to 8f1b95e Compare November 6, 2024 02:19
Copy link
Owner

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

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

These changes look great. Many thans!

@jacobtomlinson jacobtomlinson merged commit 1597945 into jacobtomlinson:master Nov 6, 2024
3 checks passed
@lucacome lucacome deleted the remove-ioutil branch November 6, 2024 19:58
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.

2 participants