Skip to content

Document the exported API - #90

Merged
ilyabrin merged 1 commit into
mainfrom
docs/api-comments
Oct 7, 2026
Merged

ilyabrin merged 1 commit into
mainfrom
docs/api-comments

Conversation

@ilyabrin

@ilyabrin ilyabrin commented Oct 7, 2026

Copy link
Copy Markdown
Owner

What

  • Package overview (doc.go): getting a token, paths, errors,
    background operations, pages, configuration.
  • Doc comments for all 42 exported symbols that lacked them; field
    comments in types.go rewritten in English.
  • Examples on pkg.go.dev: getting started, listing a folder, uploading,
    publishing, and following a background copy. They compile, but do
    not run, since they need a real token.
  • revive's exported rule is enabled, so new exported API needs a doc
    comment. The stuttering check stays off: renaming DiskLogger and
    friends would break callers.

No code changes.

Checked locally

go vet on amd64 and 386, go test ./..., golangci-lint v2.13.2 (and
that it fails when a doc comment is removed); every [Symbol] link in
the docs resolves.

Every exported type, method and constant now has a doc comment, and
the package has an overview: tokens, paths, errors, background
operations and pages. Field comments in types.go are rewritten in
English. Examples show up on pkg.go.dev; they compile but do not run,
since they need a real token. The revive exported rule is on again,
so new API cannot land undocumented.
@ilyabrin
ilyabrin merged commit 7e9d1d8 into main Oct 7, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant