github.com/moapis/ehtml
Package ehtml provides ways of rendering an error html page, using Go templates. It supports status code specific templates, with fallback to a generic error template. If no templates are defined, it uses a simple placeholder template. Define some templates: Parse them into a globale variable (or part of your Handler object): If you are using Gorilla mux, set the `NotFoundHandler` Optionally, extend `Data` to add more context. As an alternative, you can also roll your own implementation of `Provider`. And whenever something goes wrong in your handlers, call `Render()`:
Ecosystem
proxy.golang.org
proxy.golang.org
Latest Release
almost 6 years ago
v0.2.1
almost 6 years ago
Versions
3
3
Dependent Packages
1
1
Dependent Repos
2
2
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/moapis/ehtml
spec |
| License | BSD-3-Clause |
| Namespace | github.com/moapis |
| First Release | almost 6 years ago |
| Last Synced | 10 days ago |
Repository
| Stars | 0 on GitHub |
| Forks | 0 on GitHub |
Rankings on proxy.golang.org
Dependent packages
Top 5.8%
Dependent repos
Top 3.5%