• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jeffotoni / quick / 284
88%

Build:
DEFAULT BRANCH: main
Ran 25 Mar 2025 12:47PM UTC
Jobs 1
Files 130
Run time 124min
Badge
Embed โ–พ
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Mar 2025 12:43PM UTC coverage: 50.801% (-0.6%) from 51.374%
284

push

circleci

jeffotoni
feat(template/html): add alias support, embedded FS, layout nesting, and full test coverage

This update introduces major enhancements to the HTML template engine:

 Added support for template aliasing:
   - Templates can now be referenced by multiple names:
     - Full path (e.g., "views/index.html")
     - Relative path (e.g., "index.html")
     - Clean name (e.g., "index")

 Support for layouts and nested layouts using `{{ .yield }}`.

 Embedded file system (`embed.FS`) support:
   - Templates can be embedded using `//go:embed`.
   - Dynamic base directory (`engine.Dir`) is respected.
   - `Load()` parses and registers templates from embedded FS or local filesystem.

 Added `AddFunc()` for registering custom template functions.
   - Example: `upper` function used in tests and examples.

 Full test suite:
   - Unit tests for rendering, layouts, aliases, and function registration.
   - Benchmark tests for performance comparison.
   - Temporary test data is created and removed automatically.

 Improved internal template registration logic for consistency across environments.

๐Ÿ›  Refactored and cleaned up `Load()` for clarity and robustness.
๐Ÿงช All tests pass, including alias-related and layout-based renders.
๐Ÿ“š Added detailed usage examples and documentation to README.

This commit finalizes the template engine module to be fully production-ready.

67 of 193 new or added lines in 6 files covered. (34.72%)

2980 of 5866 relevant lines covered (50.8%)

1704.19 hits per line

New Missed Lines in Diff

Lines Coverage โˆ† File
3
84.09
-0.19% quick.go
11
72.83
-3.02% ctx.go
29
0.0
example/template/embed/main.go
30
0.0
example/template/custom/main.go
53
50.93
template/html/html.go
Jobs
ID Job ID Ran Files Coverage
1 284.1 25 Mar 2025 12:47PM UTC 130
50.8
CircleCI Job
Source Files on build 284
  • Tree
  • List 130
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage โˆ† File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • CircleCI Build #284
  • f6d2739e on github
  • Prev Build on main (#283)
  • Next Build on main (#285)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc