summaryrefslogtreecommitdiffstats
path: root/cmd/root.go
diff options
context:
space:
mode:
authors <[email protected]>2025-11-26 09:06:15 -0500
committers <[email protected]>2025-11-26 09:06:15 -0500
commit7d6eb2f1a38e2265751cd61a43769959405866b4 (patch)
tree99eba2542cd2ba6f30d6e2ad1c3fc53bcb5b5901 /cmd/root.go
parentcbc521467a3cca7a17e6f691a9c7fa34f4da3e24 (diff)
downloaddborg-7d6eb2f1a38e2265751cd61a43769959405866b4.tar.gz
dborg-7d6eb2f1a38e2265751cd61a43769959405866b4.zip
feat: add debug flag to enable raw api response output
Diffstat (limited to 'cmd/root.go')
-rw-r--r--cmd/root.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/root.go b/cmd/root.go
index c4239ba..292e96d 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -9,7 +9,8 @@ import (
)
var (
- jsonOutput bool
+ jsonOutput bool
+ debugOutput bool
)
var rootCmd = &cobra.Command{
@@ -33,8 +34,13 @@ func Execute() {
func init() {
rootCmd.PersistentFlags().BoolVarP(&jsonOutput, "json", "j", false, "Output raw JSON instead of formatted text")
+ rootCmd.PersistentFlags().BoolVarP(&debugOutput, "debug", "d", false, "Enable debug output (shows raw API responses)")
}
func IsJSONOutput() bool {
return jsonOutput
}
+
+func IsDebugOutput() bool {
+ return debugOutput
+}