printer

package module
v0.0.0-...-ecdb128 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: GPL-3.0 Imports: 3 Imported by: 3

README

printer

Give your data struct the ability to print something, just like fmt.Print/Println/Printf.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Printer

type Printer interface {
	SetOutput(w io.Writer)

	Print(a ...interface{}) (n int, err error)
	Printf(format string, a ...interface{}) (n int, err error)
	Println(a ...interface{}) (n int, err error)
}

type SimplePrinter

type SimplePrinter struct {
	WritePrinter
	// contains filtered or unexported fields
}

func NewSimplePrinter

func NewSimplePrinter(w io.Writer) *SimplePrinter

func (SimplePrinter) Print

func (p SimplePrinter) Print(a ...interface{}) (n int, err error)

func (SimplePrinter) Printf

func (p SimplePrinter) Printf(format string, a ...interface{}) (n int, err error)

func (SimplePrinter) Println

func (p SimplePrinter) Println(a ...interface{}) (n int, err error)

func (*SimplePrinter) SetOutput

func (p *SimplePrinter) SetOutput(w io.Writer)

func (SimplePrinter) Write

func (p SimplePrinter) Write(buf []byte) (n int, err error)

type WritePrinter

type WritePrinter interface {
	Printer
	io.Writer
}

Jump to

Keyboard shortcuts

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