pretty

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package pretty implements a simple pretty-printer. It is intended for debugging the output of tests.

It follows pointers and produces multi-line output for complex values like slices, maps and structs.

Index

Constants

This section is empty.

Variables

View Source
var Indent = "    "

Indent is the string output at each level of indentation.

Functions

func Value

func Value(v interface{}) val

Value returns a value that will print prettily when used as an argument for the %v or %s format specifiers. With no flags, struct fields and map keys with default values are omitted. With the '+' or '#' flags, all values are displayed.

This package does not detect cycles. Attempting to print a Value that contains cycles will result in unbounded recursion.

Types

This section is empty.

Jump to

Keyboard shortcuts

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