docs(godoc): trim package doc.go to point at the docs site#385
Open
FumingPower3925 wants to merge 2 commits into
Open
docs(godoc): trim package doc.go to point at the docs site#385FumingPower3925 wants to merge 2 commits into
FumingPower3925 wants to merge 2 commits into
Conversation
The documentation website (https://goceleris.dev/docs) is now the single source of truth for long-form guides, tutorials, and examples. The package-level doc.go files had grown into a large parallel copy of that material (~4k lines), a duplicated maintenance surface that drifts stale. Trim every package doc.go down to tight, accurate, IDE-facing godoc — package summary, key exported symbols, at most a minimal example — plus a "# Documentation" pointer to the matching page on the site. Symbol-level godoc on declarations (what IDEs surface on hover/autocomplete) is left untouched. - 50 doc.go trimmed, 4 already-minimal left as-is - net -3110 lines (942 insertions, 4052 deletions) - also corrects stale facts found against the real API while trimming: wrong Config timeout/logger defaults, deprecated basicauth SHA-256, MB vs MiB body limits, broken/unexported godoc symbol links, and removed/renamed symbols (probe.Probe, resource.Workload*Concurrency, session.NewMemoryStore, ratelimit.ErrorHandler, ...). Comment-only; no functional changes. gofmt, go build ./... and go vet ./... all clean.
…llector() godoc - jwt's ErrTokenMissing/ErrTokenInvalid/ErrJWTExpired/ErrJWTMalformed now chain to celeris.ErrUnauthorized via an unexported cause, so errors.Is(err, celeris.ErrUnauthorized) matches every jwt rejection — consistent with keyauth/basicauth and with the documented contract on ErrUnauthorized. HTTPError.Error() text is unchanged (regression test added). - Server.Collector() godoc: the collector is created eagerly in New() and is non-nil before Start (nil only when Config.DisableMetrics is set), matching New()'s own godoc. Surfaced by a docs usability audit. gofmt/build/vet clean; jwt, keyauth, basicauth, and root suites pass.
Contributor
Author
|
Follow-up commit
|
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.
Why
Celeris now has a full documentation website — https://goceleris.dev/docs — which is the single source of truth for long-form guides, tutorials, and runnable examples.
The package-level
doc.gofiles had independently grown into a ~4,000-line parallel copy of that same material (the rootdoc.goalone was 624 lines with ~30 tutorial sections). That's a duplicated maintenance surface: it drifts out of date, and several files already contradicted the real API (staleConfigdefaults, deprecated helpers presented as current, broken godoc symbol links, etc.).What this does
Trims every package
doc.godown to tight, accurate, IDE-facing godoc:# Documentationsection linking the matching page on the site.Symbol-level godoc on declarations (the comments on each exported type/func/method in the other
.gofiles) is left completely untouched — IDE hover andgo doc <symbol>are unaffected.Scope & numbers
git diff --name-onlyis 100%doc.go.doc.gotrimmed, 4 already-minimal left as-is.gofmt -l,go build ./..., andgo vet ./...all clean. No functional changes.Stale facts corrected while trimming
The trim pass also fixed inaccuracies caught against the real source, e.g.:
Configtimeout defaults (claimed "300s read/write"),Loggerdefault listed asnil(reallyslog.Default()).basicauth: SHA-256HashPasswordis deprecated andHashedUsersFuncis mandatory (old doc implied otherwise).bodylimit: defaults are MiB, not MB.probe:Detect()→Probe(),Capabilities→engine.CapabilityProfile.resource:WorkloadHintLow/High→WorkloadLowConcurrency/HighConcurrency.session: broken[MemoryStore]link →[NewMemoryStore].ratelimit/recovery/requestid/store: added real exported symbols that were missing; removed broken links to unexported identifiers.static/postgres/rewrite: removed stale "limitation" claims that the current implementation no longer has.Each link target was validated against a real page under the docs site.
Review notes
internal/,driver/internal/,test/) were only touched where a doc link was broken or a fact was stale.