Categorygithub.com/sshdoc/pp
modulepackage
1.3.0
Repository: https://github.com/sshdoc/pp.git
Documentation: pkg.go.dev

# README

pp wercker status

Colored pretty printer for Go language

Usage

Just call pp.Print().

import "github.com/k0kubun/pp"

m := map[string]string{"foo": "bar", "hello": "world"}
pp.Print(m)

API

fmt package-like functions are provided.

pp.Print()
pp.Println()
pp.Sprint()
pp.Fprintf()
// ...

API doc is available at: http://godoc.org/github.com/k0kubun/pp

Demo

Timeline

UserStream event

Works on windows

License

MIT License

# Functions

Errorf formats given arguments and returns it as error type.
Fatal prints given arguments and finishes execution with exit status 1.
Fatalf prints a given format and finishes execution with exit status 1.
Fatalln prints given arguments with newline and finishes execution with exit status 1.
Fprint prints given arguments to a given writer.
Fprintf prints format to a given writer.
Fprintln prints given arguments to a given writer with newline.
GetDefaultOutput returns pp's default output.
Print prints given arguments.
Printf prints a given format.
Println prints given arguments with newline.
Change Print* functions' output to default one.
Change Print* functions' output to a given writer.
Sprint formats given arguemnts and returns the result as string.
Sprintf formats with pretty print and returns the result as string.
Sprintln formats given arguemnts with newline and returns the result as string.