Documentation ¶
Index ¶
- Constants
- func ClearCurrentLine()
- func ColumnNames(columns []*sql.ColumnType) []string
- func ColumnValueAsString(val interface{}, colType *sql.ColumnType) (result string, err error)
- func ColumnValuesAsString(values []interface{}, columns []*sql.ColumnType) ([]string, error)
- func ParseJSONOutputColumnValue(val interface{}, colType *sql.ColumnType) (interface{}, error)
- func PrintInstallReports(reports []InstallReport, isUpdateReport bool)
- func ResumeSpinner(spinner *spinner.Spinner)
- func ShowOutput(result *queryresult.Result)
- func ShowPaged(content string)
- func ShowSpinner(msg string) *spinner.Spinner
- func ShowWrappedTable(headers []string, rows [][]string, autoMerge bool)
- func StartSpinnerAfterDelay(msg string, delay time.Duration, cancelStartIf chan bool) *spinner.Spinner
- func StopSpinner(spinner *spinner.Spinner)
- func StopSpinnerWithMessage(spinner *spinner.Spinner, finalMsg string)
- func UpdateSpinnerMessage(spinner *spinner.Spinner, newMessage string)
- type InstallReport
Constants ¶
const ALREADY_INSTALLED = "Already installed"
const LATEST_ALREADY_INSTALLED = "Latest already installed"
const NOT_INSTALLED = "Not installed"
Variables ¶
This section is empty.
Functions ¶
func ClearCurrentLine ¶ added in v0.8.0
func ClearCurrentLine()
func ColumnNames ¶
func ColumnNames(columns []*sql.ColumnType) []string
ColumnNames :: extract names from columns
func ColumnValueAsString ¶
func ColumnValueAsString(val interface{}, colType *sql.ColumnType) (result string, err error)
ColumnValueAsString converts column value to string
func ColumnValuesAsString ¶
func ColumnValuesAsString(values []interface{}, columns []*sql.ColumnType) ([]string, error)
ColumnValuesAsString converts a slice of columns into strings
func ParseJSONOutputColumnValue ¶ added in v0.1.2
func ParseJSONOutputColumnValue(val interface{}, colType *sql.ColumnType) (interface{}, error)
segregate data types, ignore string conversion for certain data types : JSON, JSONB, BOOL and so on..
func PrintInstallReports ¶ added in v0.3.5
func PrintInstallReports(reports []InstallReport, isUpdateReport bool)
Prints out the installation reports onto the console
func ResumeSpinner ¶ added in v0.10.0
func ShowOutput ¶
func ShowOutput(result *queryresult.Result)
ShowOutput :: displays the output using the proper formatter as applicable
func ShowPaged ¶ added in v0.1.1
func ShowPaged(content string)
ShowPaged :: displays the `content` in a system dependent pager
func ShowSpinner ¶ added in v0.4.3
ShowSpinner shows a spinner with the given message
func ShowWrappedTable ¶ added in v0.2.3
func StartSpinnerAfterDelay ¶ added in v0.4.3
func StartSpinnerAfterDelay(msg string, delay time.Duration, cancelStartIf chan bool) *spinner.Spinner
StartSpinnerAfterDelay shows the spinner with the given `msg` if and only if `cancelStartIf` resolves after `delay`.
Example: if delay is 2 seconds and `cancelStartIf` resolves after 2.5 seconds, the spinner will show for 0.5 seconds. If `cancelStartIf` resolves after 1.5 seconds, the spinner will NOT be shown at all
func StopSpinner ¶ added in v0.4.3
StopSpinner stops a spinner instance and clears it
func StopSpinnerWithMessage ¶ added in v0.4.3
StopSpinnerWithMessage stops a spinner instance and clears it, after writing `finalMsg`
func UpdateSpinnerMessage ¶ added in v0.4.3
UpdateSpinnerMessage updates the message of the given spinner