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

bump to go1.19 #54

Merged
merged 4 commits into from
Oct 13, 2022
Merged

bump to go1.19 #54

merged 4 commits into from
Oct 13, 2022

Conversation

onyxraven
Copy link
Member

@onyxraven onyxraven commented Oct 4, 2022

Background

Bump to latest things.

  1. to run golangci-lint in 1.19, had to upgrade past 1.48 -

  2. this introduced some new lints

    oswrap/exec.go:16: File is not `goimports`-ed (goimports)
    //todo use oswrap.Instance() instead of package local ow?
    oswrap/os.go:4:2: SA1019: "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
    

Versioning

Patch release

@@ -13,7 +13,7 @@ type ExecWrap interface {

type execWrap struct{}

//todo use oswrap.Instance() instead of package local ow?
// todo use oswrap.Instance() instead of package local ow?
Copy link
Member Author

Choose a reason for hiding this comment

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

linter complaint ;)

})
defer os.Remove("/tmp/TestRunCommandStdoutToFile")
Copy link
Member Author

Choose a reason for hiding this comment

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

adding to the t.TempDir means it gets cleaned up by the test framework. No more weird remove (which I'm unsure actually worked)

}
func (ow osWrap) WriteFile(filename string, data []byte, perm os.FileMode) error {
return ioutil.WriteFile(filename, data, perm)
return os.WriteFile(filename, data, perm)
Copy link
Member Author

Choose a reason for hiding this comment

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

nice that these just worked.

kr3cj
kr3cj previously approved these changes Oct 11, 2022
@@ -5,14 +5,13 @@ go 1.17
require (
github.com/golang/mock v1.6.0
github.com/mozilla-services/yaml v0.0.0-20201007153854-c369669a6625
github.com/spf13/cobra v1.2.1
Copy link
Member Author

Choose a reason for hiding this comment

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

this update reduced the dependency list for this package so much! yay!

github.com/spf13/pflag v1.0.5 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Copy link
Member Author

Choose a reason for hiding this comment

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

we don't use this one, we use the mozilla one above. this is an indirect/transient from cobra

@onyxraven onyxraven requested a review from kr3cj October 11, 2022 20:55
@onyxraven
Copy link
Member Author

tested by hand too.

@onyxraven onyxraven merged commit 0d0ebf3 into master Oct 13, 2022
@onyxraven onyxraven deleted the go1.19 branch October 13, 2022 15:17
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