Skip to content

Modernization#79

Closed
ddreggors wants to merge 38 commits intoPolpetta:mainfrom
ddreggors:dev
Closed

Modernization#79
ddreggors wants to merge 38 commits intoPolpetta:mainfrom
ddreggors:dev

Conversation

@ddreggors
Copy link
Copy Markdown

Lint tests were failing due to changes in Go version and Go Plugin versions changing. Several changes had to be made to bring the code to a more modern state.

  • Move from io/ioutil (deprecated) to os or io variants of ReadAll/TempDir/TempFile/etc...
    • ioutil.ReadAll -> io.ReadAll
    • ioutil.ReadFile -> os.ReadFile
    • ioutil.ReadDir -> os.ReadDir
    • ioutil.NopCloser -> io.NopCloser
    • ioutil.TempDir -> os.MkdirTemp
    • ioutil.TempFile -> os.CreateTemp
    • ioutil.WriteFile -> os.WriteFile
  • Use NewPluginVersion now over InitializePluginVersion
  • Add some //nolint lines to avoid errorcheck/staticcheck in some areas
  • Add some inline functions to catch errors on some defer statements

@ddreggors ddreggors closed this Apr 18, 2025
@ddreggors ddreggors deleted the dev branch April 18, 2025 14:18
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.

1 participant