debug

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 7 Imported by: 0

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

func Debug(runtime *partial.Runtime, value any) template.HTML

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

func FormatValue(value any) string

FormatValue formats a debug value for display.

func FuncMap

func FuncMap() template.FuncMap

FuncMap returns the optional debug template helper.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL