chore: extract template for documentation to a dedicated file#5677
Open
remyleone wants to merge 4 commits into
Open
chore: extract template for documentation to a dedicated file#5677remyleone wants to merge 4 commits into
remyleone wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the documentation generator to embed its markdown template from a dedicated .tmpl file, and regenerates the command docs accordingly (mostly whitespace/formatting normalization).
Changes:
- Extract the markdown template into
internal/docgen/main.md.tmpland embed it via//go:embed. - Update
internal/docgen/docgen.goto parse the embedded template instead of an inline Go string. - Regenerate
docs/commands/*.mdto reflect the template’s updated whitespace output.
Reviewed changes
Copilot reviewed 2 out of 58 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/docgen/main.md.tmpl | Moves the namespace markdown template content into a standalone template file for embedding. |
| internal/docgen/docgen.go | Switches from an inline template string to go:embed + parsing the embedded template; adjusts related types. |
| docs/commands/account.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/alias.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/apple-silicon.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/audit-trail.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/autocomplete.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/baremetal.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/billing.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/block.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/cockpit.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/config.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/container.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/datalab.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/datawarehouse.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/dns.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/domain.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/edge-services.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/environmental-footprint.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/feedback.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/file.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/fip.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/function.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/help.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/iam.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/inference.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/info.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/init.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/instance.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/interlink.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/iot.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/ipam.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/jobs.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/k8s.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/keymanager.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/lb.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/login.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/marketplace.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/mcp.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/mnq.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/mongodb.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/object.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/partner.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/product-catalog.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/rdb.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/redis.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/registry.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/s2s-vpn.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/sdb-sql.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/search.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/searchdb.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/secret.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/shell.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/tem.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/version.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/vpc-gw.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/vpc.md | Regenerated output; whitespace normalization from updated template. |
| docs/commands/webhosting.md | Regenerated output; whitespace normalization from updated template. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+15
to
+18
| import _ "embed" | ||
|
|
||
| //go:embed main.md.tmpl | ||
| var mainTemplate string |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5677 +/- ##
=======================================
Coverage 50.68% 50.68%
=======================================
Files 340 340
Lines 78086 78086
=======================================
Hits 39577 39577
Misses 37013 37013
Partials 1496 1496 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Community Note
Relates OR Closes #0000
Release note for CHANGELOG: