util

package
v0.0.0-...-47da83e Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UnitTime = progress.Units{
	Notation:  "",
	Formatter: FormatTime,
}

UnitTime defines the value as a time unit.

Functions

func FormatTime

func FormatTime(value int64) string

FormatTime formats the given value as a "Time".

func NewProgressWriter

func NewProgressWriter() progress.Writer

NewProgressWriter returns a new progress writer

func NewTableWriter

func NewTableWriter() table.Writer

NewTableWriter returns a new table writer

Types

type StatusWriter

type StatusWriter struct {
	RunningColor            text.Color
	RunningBackgroundColor  text.Color
	PendingColor            text.Color
	PendingBackgroundColor  text.Color
	SuccessColor            text.Color
	SuccessBackgroundColor  text.Color
	FailedColor             text.Color
	FailedBackgroundColor   text.Color
	CanceledColor           text.Color
	CanceledBackgroundColor text.Color
	SkippedColor            text.Color
	SkippedBackgroundColor  text.Color
}

StatusWriter gitlab status writer

func NewStatusWriter

func NewStatusWriter() *StatusWriter

NewStatusWriter returns a new status writer

func (*StatusWriter) Sprintf

func (writer *StatusWriter) Sprintf(status string) string

Sprintf formats and colorizes the given status

Jump to

Keyboard shortcuts

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