forked from TrueCloudLab/frostfs-node
[#146] Set stdout as default output for CLI
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
64caa15556
commit
49da96d006
1 changed files with 3 additions and 0 deletions
|
@ -62,6 +62,9 @@ func init() {
|
||||||
// Cobra supports persistent flags, which, if defined here,
|
// Cobra supports persistent flags, which, if defined here,
|
||||||
// will be global for your application.
|
// will be global for your application.
|
||||||
|
|
||||||
|
// use stdout as default output for cmd.Print()
|
||||||
|
rootCmd.SetOut(os.Stdout)
|
||||||
|
|
||||||
rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.config/neofs-cli/config.yaml)")
|
rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.config/neofs-cli/config.yaml)")
|
||||||
|
|
||||||
rootCmd.PersistentFlags().StringP("key", "k", "", "private key in hex, WIF or filepath (use `--key new` to generate key for request)")
|
rootCmd.PersistentFlags().StringP("key", "k", "", "private key in hex, WIF or filepath (use `--key new` to generate key for request)")
|
||||||
|
|
Loading…
Reference in a new issue