feat(cmd): added flag for displaying binary data in tty, and cleaned up some old code

This commit is contained in:
Lewis Wynne 2025-11-06 22:30:50 +00:00
parent 63ade13e7a
commit 990ff7ce40
4 changed files with 29 additions and 23 deletions

View file

@ -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)
}