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 NewErrorWriter(w io.Writer, f *output.Formatting) output.ErrorWriter
- func NewMetadataWriter(out io.Writer, fm *output.Formatting) output.MetadataWriter
- func NewRecordWriter(out io.Writer, fm *output.Formatting) output.RecordWriter
- func NewSourceWriter(out io.Writer, fm *output.Formatting) output.SourceWriter
- func NewVersionWriter(out io.Writer, fm *output.Formatting) output.VersionWriter
- type PingWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrorWriter ¶
func NewErrorWriter(w io.Writer, f *output.Formatting) output.ErrorWriter
NewErrorWriter returns an output.ErrorWriter that outputs in text format.
func NewMetadataWriter ¶
func NewMetadataWriter(out io.Writer, fm *output.Formatting) output.MetadataWriter
NewMetadataWriter returns a new output.MetadataWriter instance that outputs metadata in table format.
func NewRecordWriter ¶
func NewRecordWriter(out io.Writer, fm *output.Formatting) output.RecordWriter
NewRecordWriter returns a RecordWriter for text table output.
func NewSourceWriter ¶
func NewSourceWriter(out io.Writer, fm *output.Formatting) output.SourceWriter
NewSourceWriter returns a source writer that outputs source details in text table format.
func NewVersionWriter ¶ added in v0.21.0
func NewVersionWriter(out io.Writer, fm *output.Formatting) output.VersionWriter
NewVersionWriter returns a new output.VersionWriter instance that outputs version info in JSON.
Types ¶
type PingWriter ¶
type PingWriter struct {
// contains filtered or unexported fields
}
PingWriter implements output.PingWriter.
func NewPingWriter ¶
func NewPingWriter(out io.Writer, fm *output.Formatting) *PingWriter
NewPingWriter returns a new instance. It is not safe for concurrent use.
func (*PingWriter) Close ¶
func (w *PingWriter) Close() error