printer/printer.go
changeset 110 57843255fd1a
parent 85 a4464c0b0c36
equal deleted inserted replaced
109:912e72511084 110:57843255fd1a
    10 	"io"
    10 	"io"
    11 )
    11 )
    12 
    12 
    13 // Options contains options used when creating a ResourcePrinter
    13 // Options contains options used when creating a ResourcePrinter
    14 type Options map[string]string
    14 type Options map[string]string
       
    15 
       
    16 type commonPrinter struct {
       
    17 	w io.Writer
       
    18 }
    15 
    19 
    16 // ResourcePrinter is an interface used to print objects.
    20 // ResourcePrinter is an interface used to print objects.
    17 type ResourcePrinter interface {
    21 type ResourcePrinter interface {
    18 	// PrintObj receives a runtime object, formats it and prints it to a writer.
    22 	// PrintObj receives a runtime object, formats it and prints it to a writer.
    19 	PrintObj(interface{}, io.Writer, string) error
    23 	PrintObj(interface{}, io.Writer, string) error