[#1323] neofs-cli: Reuse JSON flag for multiple commands

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-06-23 16:52:47 +03:00 committed by fyrchik
parent e812d78672
commit 9816d59ec0
12 changed files with 17 additions and 13 deletions

View file

@ -115,7 +115,7 @@ func getObject(cmd *cobra.Command, _ []string) {
}
func strictOutput(cmd *cobra.Command) bool {
toJSON, _ := cmd.Flags().GetBool("json")
toJSON, _ := cmd.Flags().GetBool(commonflags.JSON)
toProto, _ := cmd.Flags().GetBool("proto")
return toJSON || toProto
}