Moving to SetOut and SetErr for Cobra

SetOutput is deprecated. This causes it to fail linting.

Signed-off-by: Matt Farina <matt@mattfarina.com>
(cherry picked from commit b689ff203e)
pull/30551/head
Matt Farina 7 months ago
parent a31c17023c
commit 4c2f88b2ab
No known key found for this signature in database
GPG Key ID: 461449C25E36B98E

@ -71,7 +71,8 @@ func runTestCases(t *testing.T, testCases []testCase) {
Args: tc.validateFunc,
}
cmd.SetArgs(tc.args)
cmd.SetOutput(io.Discard)
cmd.SetOut(io.Discard)
cmd.SetErr(io.Discard)
err := cmd.Execute()
if tc.wantError == "" {

Loading…
Cancel
Save