package pp
import "github.com/k0kubun/pp"
Index ¶
- 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 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 ResetDefaultOutput()
- func SetDefaultOutput(o io.Writer)
- func Sprint(a ...interface{}) string
- func Sprintf(format string, a ...interface{}) string
- func Sprintln(a ...interface{}) string
Functions ¶
func Errorf ¶
Errorf formats given arguments and returns it as error type.
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 Fprint ¶
Fprint prints given arguments to a given writer.
func Fprintf ¶
Fprintf prints format to a given writer.
func Fprintln ¶
Fprintln prints given arguments to a given writer with newline.
func GetDefaultOutput ¶
GetDefaultOutput returns pp's default output.
func Print ¶
Print prints given arguments.
func Printf ¶
Printf prints a given format.
func Println ¶
Println prints given arguments with newline.
func ResetDefaultOutput ¶
func ResetDefaultOutput()
Change Print* functions' output to default one.
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 arguemnts and returns the result as string.
func Sprintf ¶
Sprintf formats with pretty print and returns the result as string.
func Sprintln ¶
func Sprintln(a ...interface{}) string
Sprintln formats given arguemnts with newline and returns the result as string.
Source Files ¶
- Version
- v1.1.0
- Published
- Feb 14, 2015
- Platform
- js/wasm
- Imports
- 11 packages
- Last checked
- now –
Tools for package owners.