You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(pkg): document every exported symbol, and delete the rest
Completes the backfill the comment rule asks for in this module: 229
exported symbols now carry a godoc, which turns the revive rule from red
to green for pkg/. Each says what a caller cannot see from the signature —
that DeviceStatusRemoved frees its slot against the device limit
immediately, that HasMaxDevicesReached compares against -1 when there is
no ceiling, that KindInvalid is what makes a forgotten scope a rejection
rather than an unbounded query.
74 other comment lines go, because no linter asks for them. What they said,
recorded here because the code no longer can:
- pkg/api/client's commonAPI and publicAPI are unexported, so the
per-method documentation of the agent's own API went with them:
CreateDeviceLoginCode returns a short-lived code that deep-links the
device into the console's accept page and is authenticated with the
device token; CreateDevicePairing is unauthenticated and the code it
returns is itself the secret; NewReverseListenerV1 speaks RevDial and V2
speaks Yamux.
- Retry-After is allowed to carry either a delay in seconds or a date, and
only the delay is handled (RFC 9110 section 10.2.3).
- authorizer.code returns 0 for a role it does not know, and the switch's
default clause leaves the permission slice empty on purpose so a role
added later is powerless rather than privileged.
- yamux refuses to build a session without LogOutput, which is why the
translation fills it in.
- The client's reverser field is what the SSH server dials back in through.
golangci-lint reports 0 issues for ./pkg/... with the exported rule on, and
the tests pass apart from the two asynq cases that need a Docker daemon
inside the container.
0 commit comments