Skip to content

docs: reconstruct examples for full godoc coverage; fix stale package doc - #21

Merged
mpyw merged 1 commit into
mainfrom
docs/examples-reconstruct
Aug 18, 2026
Merged

docs: reconstruct examples for full godoc coverage; fix stale package doc#21
mpyw merged 1 commit into
mainfrom
docs/examples-reconstruct

Conversation

@mpyw

@mpyw mpyw commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Reconstructs the godoc examples and fixes an outdated package comment.

  • doc.go: the package comment still described the pre-explicit-model design (a /*> */ partial include, "drops clauses that become empty and AND/OR left dangling"). Rewritten to describe the current explicit model and @include.
  • example_test.go: rebuilt as 26 testable examples. Package-level examples (Example, Example_conditional, Example_iteration, Example_literal, Example_inListExpansion, Example_arrayBind, Example_include, Example_dialects) cover the README concepts and render in the package's top Examples section; the rest attach to their public symbol so they render under it (ExampleParse, ExampleParseFile, ExampleExpand, ExampleExpandFile, ExampleNewParser, ExampleWithDialect, ExampleWithLoader, ExampleWithStackedLoader, ExampleWithEvaluator, the loader constructors, ExampleParser_Parse/_ParseFile, ExampleTemplate_Build, ExampleRegistryLoader_Register, ExampleStatement_SQLWithArgs). Each statement-building example prints SQL, Args, and the values-embedded SQLWithArgs form. Fixes the old lowercase ExampleStatement_sqlWithArgs (now attaches to the method page).
  • bench_test.go: remove the micro-benchmark (not run in CI, stale employees schema); keep its concurrency/immutability check, moved to bisql_test.go as TestTemplateConcurrentBuild (run under -race).

🤖 Generated with Claude Code

… doc

- doc.go: the package comment described the pre-explicit-model design (a
  /*> */ partial include, "drops clauses that become empty and AND/OR left
  dangling"). Rewrite it to describe the current explicit model and @include.
- example_test.go: rebuilt from scratch as 26 testable examples. Package-level
  examples (Example, Example_conditional, Example_iteration, Example_literal,
  Example_inListExpansion, Example_arrayBind, Example_include, Example_dialects)
  cover the README's concepts and render in the package's top Examples section;
  the rest are attached to their public symbol (ExampleParse, ExampleParseFile,
  ExampleExpand, ExampleExpandFile, ExampleNewParser, ExampleWithDialect,
  ExampleWithLoader, ExampleWithStackedLoader, ExampleWithEvaluator, the loader
  constructors, ExampleParser_Parse/_ParseFile, ExampleTemplate_Build,
  ExampleRegistryLoader_Register, ExampleStatement_SQLWithArgs). Each
  statement-building example prints SQL, Args, and the values-embedded
  SQLWithArgs form. Fixes the old lowercase ExampleStatement_sqlWithArgs (now
  attaches to the method page).
- bench_test.go: remove the micro-benchmark (not run in CI, stale schema); keep
  its concurrency/immutability check, moved to bisql_test.go as
  TestTemplateConcurrentBuild (run under -race).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAydPGeSHjZvJv22oz4P6d
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.52%. Comparing base (3cc7fa8) to head (5c4ba10).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #21   +/-   ##
=======================================
  Coverage   96.52%   96.52%           
=======================================
  Files          11       11           
  Lines         951      951           
=======================================
  Hits          918      918           
  Misses         21       21           
  Partials       12       12           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mpyw
mpyw merged commit 5ec23dc into main Aug 18, 2026
3 checks passed
@mpyw
mpyw deleted the docs/examples-reconstruct branch August 19, 2026 06:49
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