cmdlog

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HumanFloat32

func HumanFloat32(num float32) string

HumanFloat32 returns the number in a human readable format

func HumanUint32

func HumanUint32(num uint32) string

HumanUint32 returns the number in a human readable format

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger logs pretty stuff to the console

func New

func New() *Logger

New returns a new Logger

func (*Logger) Fail

func (l *Logger) Fail(s string)

Fail will print the given message with PrintLn and then exit 1

func (*Logger) Headline

func (l *Logger) Headline(s string)

Headline prints a blue line

func (*Logger) Info

func (l *Logger) Info(s string)

Info prints a "normal" line

func (*Logger) Log

func (l *Logger) Log(s string)

Log prints a black line

func (*Logger) NewTask

func (l *Logger) NewTask(end int) *Task

NewTask returns a new Task logger

func (*Logger) Warn

func (l *Logger) Warn(s string)

Warn will print a warning

type Task

type Task struct {
	*Logger
	// contains filtered or unexported fields
}

Task logs but with progress

func (*Task) Step

func (l *Task) Step(e string, s string)

Step prints progress

Jump to

Keyboard shortcuts

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