debug

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package debug provides template functions to help debugging templates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Namespace

type Namespace struct {
}

Namespace provides template functions for the "debug" namespace.

func New

func New(d *deps.Deps) *Namespace

New returns a new instance of the debug-namespaced template functions.

func (*Namespace) Dump

func (ns *Namespace) Dump(val any) string

Dump returns a object dump of val as a string. Note that not every value passed to Dump will print so nicely, but we'll improve on that. We recommend using the "go" Chroma lexer to format the output nicely. Also note that the output from Dump may change from Hugo version to the next, so don't depend on a specific output.

Jump to

Keyboard shortcuts

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