Moves tableprinter.go and tabwriter.go to cli-runtime/pkg/printers. Copies PrintOptions to cli-runtime/pkg/printers.

This commit is contained in:
Sean Sullivan
2019-10-17 13:22:46 -07:00
parent 2adadf9218
commit 8b2130343e
10 changed files with 31 additions and 47 deletions

View File

@@ -20,7 +20,6 @@ import (
"io"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
// ResourcePrinter is an interface that knows how to print runtime objects.
@@ -36,19 +35,3 @@ type ResourcePrinterFunc func(runtime.Object, io.Writer) error
func (fn ResourcePrinterFunc) PrintObj(obj runtime.Object, w io.Writer) error {
return fn(obj, w)
}
// PrintOptions struct defines a struct for various print options
type PrintOptions struct {
NoHeaders bool
WithNamespace bool
WithKind bool
Wide bool
ShowLabels bool
Kind schema.GroupKind
ColumnLabels []string
SortBy string
// indicates if it is OK to ignore missing keys for rendering an output template.
AllowMissingKeys bool
}