Documentation
¶
Overview ¶
Package debug provides an optional renderer for debug output.
Index ¶
Constants ¶
View Source
const RenderKindDebug partial.RenderKind = "debug"
RenderKindDebug is the renderer kind used for debug fragments.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
Debug renders a diagnostic value through the active render stage chain.
go-doc:sig func(runtime *github.com/donseba/go-partial.Runtime, value any) html/template.HTML
func FormatValue ¶
FormatValue formats a debug value for display.
func Stage ¶
func Stage() partial.RenderStage
Stage returns a render stage that handles debug render contexts.
Types ¶
type Data ¶
type Data struct {
Value any
Output string
PartialID string
Templates []string
Request *http.Request
URL *url.URL
}
Data is the template data used by the debug renderer.
func BuildData ¶
func BuildData(ctx *partial.RenderContext) Data
BuildData converts a render context into debug template data.
Click to show internal directories.
Click to hide internal directories.