Moving to SetOut and SetErr for Cobra

SetOutput is deprecated. This causes it to fail linting.

Signed-off-by: Matt Farina <matt@mattfarina.com>
pull/30550/head
Matt Farina 7 months ago
parent 9062179ea1
commit b689ff203e
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, Args: tc.validateFunc,
} }
cmd.SetArgs(tc.args) cmd.SetArgs(tc.args)
cmd.SetOutput(io.Discard) cmd.SetOut(io.Discard)
cmd.SetErr(io.Discard)
err := cmd.Execute() err := cmd.Execute()
if tc.wantError == "" { if tc.wantError == "" {

Loading…
Cancel
Save