Skip to content

docs(pkg): add runnable examples for the last exempt packages - #2735

Open
houko wants to merge 1 commit into
mainfrom
docs/issue-2614-package-examples
Open

houko wants to merge 1 commit into
mainfrom
docs/issue-2614-package-examples

Conversation

@houko

@houko houko commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Every library package in the root module now has an example_test.go, so TestEveryPackageHasExamples needs no exemptions: the 28 remaining packages from #2614 got examples, and exampleExemptions is empty. The offline examples (cover generation, motion, hot reload, save round trips, agent cache, diagnostics redaction, theme contrast, audit log, port mapping, OIDC/JWKS, SQLite cloud saves and leaderboards, WeChat Pay signing, an httptest WebSocket echo, and the tooling packages) carry // Output: and run under go tool nsgo test; the two Postgres stores, hostbridge, steam, steamworks and eos are compile-only because they need a database or a running app with a native SDK. The equivalent docs/en and docs/zh pages and the process note that owns the exemption list are updated, with a changelog fragment.

Related issue

Fixes #2614

Verification

  • gofmt -l produces no output for the changed and new Go files
  • go tool nsgo test ./... passes from the repository root (not run: the whole-repository suite is out of scope here; the affected packages were tested instead)
  • go tool nsgo check -target macos,windows,linux,android,web passes from the repository root (not run in full; each affected package was vetted for the host, web, windows and android)
  • go tool nsgo check -target ios,ios_simulator passes (not run: needs Xcode and is out of scope for these packages)
  • bun run build passes (for docs/ or website/ changes)
  • Both docs/en/ and docs/zh/ updated

Affected-package checks run:

  • go tool nsgo test on all 28 packages (and internal/repocheck), including TestEveryPackageHasExamples
  • go tool nsgo check on the host for all 28 packages and internal/repocheck
  • go tool nsgo check -target web,windows,android on the packages whose examples depend on build tags or native SDKs
  • bun run verify-notes and go run ./tools/changelog check

Screenshots

None: the change adds Go examples and documentation only, with no visible UI change.

Give every remaining library package in the root module an example_test.go, removing all 28 entries from exampleExemptions so TestEveryPackageHasExamples has no exemptions left. The offline examples carry // Output:; the Postgres stores and the Steamworks and EOS integrations stay compile-only because they need a database or a running app.

Update the equivalent docs/en and docs/zh packages pages, the process note that owns the exemption list, and add a changelog fragment.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: runnable examples for the 28 packages exempt from TestEveryPackageHasExamples

1 participant