Skip to content

Comments

Remove/replace SetOutput on Command - deprecated#1078

Merged
jharshman merged 4 commits intospf13:masterfrom
jpmcb:master
Apr 6, 2020
Merged

Remove/replace SetOutput on Command - deprecated#1078
jharshman merged 4 commits intospf13:masterfrom
jpmcb:master

Conversation

@jpmcb
Copy link
Collaborator

@jpmcb jpmcb commented Apr 2, 2020

Addresses #1071

This removes the SetOutput method on *Command as it is deprecated and replaces those methods with SetOut and SetErr.

I didn't touch any of the SetOutput methods on *FlagSet as that appears to be apart of the github.com/spf13/pflag library. Do we think it's valuable to change that library as well?

If we don't want to entirely remove the function just yet, let me know!

@CLAassistant
Copy link

CLAassistant commented Apr 2, 2020

CLA assistant check
All committers have signed the CLA.

@jharshman jharshman added the kind/feature A feature request for cobra; new or enhanced behavior label Apr 2, 2020
@jharshman
Copy link
Collaborator

jharshman commented Apr 3, 2020

If we don't want to entirely remove the function just yet, let me know!

@jpmcb yeah let's not remove it entirely. This is an exported method and we have no way of knowing the extent to which it is used in other projects.

Copy link
Collaborator

@jharshman jharshman left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature A feature request for cobra; new or enhanced behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants