Document the command in the package comment - #68
Merged
Conversation
pkg.go.dev showed "There is no documentation for this package" for every version published so far, because main carried no doc comment. The README links to that page with a Go Reference badge, so the badge advertised documentation that did not exist. Covers what the tool is for, the shape of an invocation, the exit codes, and which options read the environment -- the four things somebody landing on pkg.go.dev from the badge is trying to find out. The exit codes are the part worth writing down. They are the tool's actual output, and the distinction between a failed assertion and a tool that could not run is what lets a pipeline tell a broken service from a broken invocation. Documentation only; no behaviour change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019EMMhgmTkbzAsmeNy97PrP
Two of the five codes were missing. 71 has been returned since unparseable environment values started being rejected, and 91 for as long as a malformed method or URL has been possible -- neither was ever written down. The gap mattered more than a missing table row. A script that treats every non-zero code as "the service is down" reads a typo in HTTP_ASSERT_MAX_TIME as an outage, which is the opposite of what the tool is for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019EMMhgmTkbzAsmeNy97PrP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
pkg.go.dev says there is no documentation for this package, and the README links to that page with a badge.
Measured against the currently-indexed
v0.0.7, the page renders exactly one thing:main.goopened with a barepackage main, and pkg.go.dev renders a command's doc comment or nothing at all. So the Go Reference badge on line 1 of the README has been advertising documentation that does not exist.Solution
Write the package comment, and make the README agree with it about exit codes.
The comment covers the four things somebody arriving from that badge is trying to learn: what the tool is for, the shape of an invocation, the exit codes, and which options read the environment. Every example in it was run against a live endpoint before being written down, and each documented exit code was reproduced:
Writing those down exposed that the README listed three of the five.
71has been returned since unparseable environment values started being rejected, and91for as long as a malformed method or URL has been possible — neither was ever documented. That gap is worse than a missing table row: a monitoring script that reads every non-zero code as "the service is down" reports a typo inHTTP_ASSERT_MAX_TIMEas an outage, which inverts the tool's purpose.Documentation only — no behaviour change, and the end-to-end suite is untouched.
Other Changes
None.
Notes for the reviewer
This lands on the next tag, not retroactively on
v0.1.0; pkg.go.dev renders whatever the tagged commit contained.The exit codes now appear in three places — the package comment, the README, and
e2e_harness_test.go's constants. Only the last is enforced. Worth an issue if the duplication bothers you; I did not want to invent a doc-linting mechanism inside a docs PR.🤖 Generated with Claude Code