Conversation
onyxraven
commented
Oct 11, 2022
| type execWrap struct{} | ||
|
|
||
| //todo use oswrap.Instance() instead of package local ow? | ||
| // todo use oswrap.Instance() instead of package local ow? |
| return ioutil.TempFile("/tmp", "TestRunCommandStdoutToFile") | ||
| return os.CreateTemp(t.TempDir(), "TestRunCommandStdoutToFile") | ||
| }) | ||
| defer os.Remove("/tmp/TestRunCommandStdoutToFile") |
Member
Author
There was a problem hiding this comment.
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) |
Member
Author
There was a problem hiding this comment.
nice that these just worked.
kr3cj
previously approved these changes
Oct 11, 2022
onyxraven
commented
Oct 11, 2022
| 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 |
Member
Author
There was a problem hiding this comment.
this update reduced the dependency list for this package so much! yay!
onyxraven
commented
Oct 11, 2022
| github.com/inconshreveable/mousetrap v1.0.1 // indirect | ||
| github.com/russross/blackfriday/v2 v2.1.0 // indirect | ||
| github.com/spf13/pflag v1.0.5 // indirect | ||
| gopkg.in/yaml.v2 v2.4.0 // indirect |
Member
Author
There was a problem hiding this comment.
we don't use this one, we use the mozilla one above. this is an indirect/transient from cobra
Member
Author
|
tested by hand too. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Bump to latest things.
to run golangci-lint in 1.19, had to upgrade past 1.48 -
this introduced some new lints
Versioning
Patch release