helpers

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomConsoleWriter

func CustomConsoleWriter(fileLogger *zerolog.ConsoleWriter) zerolog.ConsoleWriter

CustomConsoleWriter creates an output to print log in a files

func PrintResult

func PrintResult(summary *model.Summary, failedQueries map[string]error) error

PrintResult prints on output the summary results

func PrintToJSONFile

func PrintToJSONFile(path string, body interface{}) error

PrintToJSONFile prints on JSON file the summary results

func WordWrap

func WordWrap(s, identation string, limit int) string

WordWrap Wraps text at the specified number of words

Types

type ProgressBar

type ProgressBar struct {
	Writer io.Writer
	// contains filtered or unexported fields
}

ProgressBar represents a Progress Writer is the writer output for progress bar

func NewProgressBar

func NewProgressBar(label string, space int, total float64, progress chan float64) ProgressBar

NewProgressBar initializes a new ProgressBar label is a string print before the progress bar total is the progress bar target (a.k.a 100%) space is the number of '=' characters on each side of the bar progress is a channel updating the current executed elements

func (*ProgressBar) Start

func (p *ProgressBar) Start(wg *sync.WaitGroup)

Start starts to print a progress bar on console wg is a wait group to report when progress is done

Jump to

Keyboard shortcuts

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