Sets up project structure, working conventions (CLAUDE.md), README with the full assignment and roadmap, seeded CHANGELOG, and a buildable Go scaffold (Step 0) with flag parsing and stub probe types. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.2 KiB
1.2 KiB
Step 0 — Scaffold
What this step delivers
A buildable Go binary (latprobe) that parses flags and URLs, prints usage
when invoked without arguments, and exits cleanly. No measurement logic yet —
the full implementation is wired in during Steps 1–4.
Build
cd go
go build -o latprobe .
Usage
# No arguments → prints usage and exits with code 1
./latprobe
# With a URL → scaffold message until Step 1 is implemented
./latprobe https://example.com
Expected output (scaffold stage):
latprobe — measure per-phase HTTP request latency
Usage:
latprobe [flags] <url> [url ...]
Flags:
-n, --count int Number of requests per URL (default 1)
--json Output results as JSON instead of text
-h, --help Show this help
Examples:
latprobe https://example.com
latprobe -n 5 https://example.com https://www.google.com
latprobe --json https://example.com | jq .
Available flags (accepted by the parser, not yet functional)
| Flag | Short | Default | Description |
|---|---|---|---|
--count |
-n |
1 |
Number of requests per URL |
--json |
— | false | Output as JSON instead of text |
--help |
-h |
— | Show usage |