Skip to content

Modernization and Lint fixes#80

Open
ddreggors wants to merge 36 commits intoPolpetta:mainfrom
ddreggors:main
Open

Modernization and Lint fixes#80
ddreggors wants to merge 36 commits intoPolpetta:mainfrom
ddreggors:main

Conversation

@ddreggors
Copy link
Copy Markdown

Go and Go plugins needed to updated to newer versions, as a result of that change the lint tests were failing. Several changes had to be made to bring the code to a more modern state.

  • Update Go version
  • Update plugins to match Go version
  • 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

Request access to Artifactory
Prepare to demo a packer build of CentOS and Ubuntu

ddreggors and others added 6 commits April 17, 2025 15:13
* Fix all dependencies and library version

* Use proper flags for all updated dependencies

* Update Job and step names

* Use build/release badges in readme
* Testing new badges in readme

* Cleanup

* Add better names to jobs and steps

* Use new gpg import libs

   - hashicorp/ghaction-import-gpg is deprecated: https://github.com/hashicorp/ghaction-import-gpg

   - Now using crazy-max/ghaction-import-gpg
* Testing new badges in readme

* Cleanup

Add better names to jobs and steps
Re-add update code for golangci-lint

* Fix runs-on

* Remove manual code to use 2.1.2 for golangci-lint

* Use new gpg import libs

hashicorp/ghaction-import-gpg is deprecated:
https://github.com/hashicorp/ghaction-import-gpg

Now using crazy-max/ghaction-import-gpg

* Linter updates

* Better naming for GitHub Actions
@ddreggors
Copy link
Copy Markdown
Author

Also, due to the deprecation of hashicorp's ghaction-import-gpg plugin action, I moved to crazy-max's implementation as suggested by hashicorp:

Warning: This action has been deprecated
We recommend using the crazy-max/ghaction-import-gpg upstream action that this was based on.

https://github.com/hashicorp/ghaction-import-gpg

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