Documentation
¶
Index ¶
- Variables
- func Errorf(format string, a ...interface{}) error
- func Fatal(a ...interface{})
- func Fatalf(format string, a ...interface{})
- func Fatalln(a ...interface{})
- func Fprint(w io.Writer, a ...interface{}) (n int, err error)
- func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error)
- func Fprintln(w io.Writer, a ...interface{}) (n int, err error)
- func GetDefaultOutput() io.Writer
- func New(callerLevel ...int) *pp.PrettyPrinter
- func Print(a ...interface{}) (n int, err error)
- func Printf(format string, a ...interface{}) (n int, err error)
- func Println(a ...interface{}) (n int, err error)
- func ResetColorScheme()
- func ResetDefaultOutput()
- func SetColorScheme(scheme pp.ColorScheme)
- func SetDefaultMaxDepth(v int)
- func SetDefaultOutput(o io.Writer)
- func Sprint(a ...interface{}) string
- func Sprintf(format string, a ...interface{}) string
- func Sprintln(a ...interface{}) string
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = New(3)
Functions ¶
func Fatal ¶
func Fatal(a ...interface{})
Fatal prints given arguments and finishes execution with exit status 1.
func Fatalf ¶
func Fatalf(format string, a ...interface{})
Fatalf prints a given format and finishes execution with exit status 1.
func Fatalln ¶
func Fatalln(a ...interface{})
Fatalln prints given arguments with newline and finishes execution with exit status 1.
func New ¶
func New(callerLevel ...int) *pp.PrettyPrinter
func SetColorScheme ¶
func SetColorScheme(scheme pp.ColorScheme)
SetColorScheme takes a colorscheme used by all future Print calls.
func SetDefaultMaxDepth ¶
func SetDefaultMaxDepth(v int)
SetMaxDepth sets the printer's Depth, -1 prints all
func SetDefaultOutput ¶
Change Print* functions' output to a given writer. For example, you can limit output by ENV.
func init() { if os.Getenv("DEBUG") == "" { pp.SetDefaultOutput(ioutil.Discard) } }
func Sprint ¶
func Sprint(a ...interface{}) string
Sprint formats given arguments and returns the result as string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.