output

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderError

func RenderError(errorMsg string, opts Options)

RenderError .

func RenderInfo

func RenderInfo(infoMsg string, opts Options)

RenderInfo .

func RenderJSON

func RenderJSON(data interface{}, opts Options)

RenderJSON .

func RenderOutput

func RenderOutput(data Table, opts Options)

RenderOutput .

func RenderResult

func RenderResult(result Result, opts Options)

RenderResult .

Types

type Data

type Data []string

Data .

type Options

type Options struct {
	Header bool
	CSV    bool
	JSON   bool
	Pretty bool
	Debug  bool
	Error  string
}

Options .

type Result

type Result struct {
	ResultData map[string]interface{} `json:"data,omitempty"`
	Result     string                 `json:"result,omitempty"`
	Error      string                 `json:"error,omitempty"`
	Info       string                 `json:"info,omitempty"`
}

Result .

type Table

type Table struct {
	Header []string `json:"header"`
	Data   []Data   `json:"data"`
}

Table .

Jump to

Keyboard shortcuts

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