Gopher

debug

Debug is Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

debug.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.

Examples

{{- $m := newScratch -}}
{{- $m.Set "Hugo" "Rocks!" -}}
{{- $m.Values | debug.Dump | safeHTML -}}
map[string]interface {}{
  "Hugo": "Rocks!",
}