Documentation ¶
Overview ¶
Package tablew implements text table output writers.
The actual rendering of the text table is handled by a modified version ofolekukonko/tablewriter which can be found in the internal sub-package. At the time, tablewriter didn't provide all the functionality that sq required. However, that package has been significantly developed since then fork, and it may be possible that we could dispense with the forked version entirely and directly use a newer version of tablewriter.
This entire package could use a rewrite, a lot has changed with sq since this package was first created. So, if you see code in here that doesn't make sense to you, you're probably judging it correctly.
Index ¶
- func NewConfigWriter(out io.Writer, pr *output.Printing) output.ConfigWriter
- func NewErrorWriter(w io.Writer, pr *output.Printing) output.ErrorWriter
- func NewMetadataWriter(out io.Writer, pr *output.Printing) output.MetadataWriter
- func NewRecordWriter(out io.Writer, pr *output.Printing) output.RecordWriter
- func NewSourceWriter(out io.Writer, pr *output.Printing) output.SourceWriter
- func NewVersionWriter(out io.Writer, pr *output.Printing) output.VersionWriter
- type PingWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfigWriter ¶ added in v0.34.0
NewConfigWriter returns a new output.ConfigWriter.
func NewErrorWriter ¶
NewErrorWriter returns an output.ErrorWriter that outputs in text format.
func NewMetadataWriter ¶
NewMetadataWriter returns a new output.MetadataWriter instance that outputs metadata in table format.
func NewRecordWriter ¶
NewRecordWriter returns a RecordWriter for text table output.
func NewSourceWriter ¶
NewSourceWriter returns a source writer that outputs source details in text table format.
func NewVersionWriter ¶ added in v0.21.0
NewVersionWriter returns a new output.VersionWriter instance that outputs version info in text.
Types ¶
type PingWriter ¶
type PingWriter struct {
// contains filtered or unexported fields
}
PingWriter implements output.PingWriter.
func NewPingWriter ¶
func NewPingWriter(out io.Writer, pr *output.Printing) *PingWriter
NewPingWriter returns a new instance. It is not safe for concurrent use.
func (*PingWriter) Close ¶
func (w *PingWriter) Close() error