From 1ce83b6b6a300f4389dd84c4477f3ca73a431524 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 8 Mar 2026 20:40:55 +0000 Subject: cli: newLogger helper, defaultServerURL, shared http client, report command - Extract newLogger() to remove duplication across run/serve/start - Add defaultServerURL const ("http://localhost:8484") used by all client commands - Move http.Client into internal/cli/http.go with 30s timeout - Add 'report' command for printing execution summaries - Add test coverage for create and serve commands Co-Authored-By: Claude Sonnet 4.6 --- internal/cli/http.go | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 internal/cli/http.go (limited to 'internal/cli/http.go') diff --git a/internal/cli/http.go b/internal/cli/http.go new file mode 100644 index 0000000..907818a --- /dev/null +++ b/internal/cli/http.go @@ -0,0 +1,10 @@ +package cli + +import ( + "net/http" + "time" +) + +const httpTimeout = 30 * time.Second + +var httpClient = &http.Client{Timeout: httpTimeout} -- cgit v1.2.3