feat(cmd): added flag for displaying binary data in tty, and cleaned up some old code
This commit is contained in:
parent
63ade13e7a
commit
990ff7ce40
4 changed files with 29 additions and 23 deletions
|
|
@ -56,10 +56,16 @@ func get(cmd *cobra.Command, args []string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
store.Print("%s", v)
|
||||
binary, err := cmd.Flags().GetBool("include-binary")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
store.Print("%s", binary, v)
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
getCmd.Flags().BoolP("include-binary", "b", false, "include binary data in text output")
|
||||
rootCmd.AddCommand(getCmd)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue