Skip to content

Commit a68ad44

Browse files
MagicalTuxclaude
andcommitted
Add -debug flag to restupload CLI tool
Adds a -debug flag that sets rest.Debug to true, enabling debug output for REST API calls. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ac28e65 commit a68ad44

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎cli/restupload/main.go‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ var (
8282
method = flag.String("method", "POST", "HTTP method for the initial API request")
8383
cookies = flag.String("cookies", "", "cookies to send with the request (format: name1=value1; name2=value2)")
8484
insecure = flag.Bool("insecure", false, "allow insecure SSL connections (skip certificate verification)")
85+
debug = flag.Bool("debug", false, "enable debug mode for REST API calls")
8586
headers headerValues
8687
)
8788

@@ -94,6 +95,12 @@ func main() {
9495
os.Exit(1)
9596
}
9697

98+
// Enable debug mode if requested
99+
if *debug {
100+
rest.Debug = true
101+
log.Println("Debug mode enabled")
102+
}
103+
97104
var p rest.Param = make(map[string]any)
98105

99106
if param := *params; param != "" {

0 commit comments

Comments
 (0)