console

package
v0.0.0-...-1f186d8 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//Red and all others are colors
	Red func(...interface{}) string
	//Green and all others are colors
	Green func(...interface{}) string
	//Yellow and all others are colors
	Yellow func(...interface{}) string
	//Blue and all others are colors
	Blue func(...interface{}) string
	//Magenta and all others are colors
	Magenta func(...interface{}) string
	//Cyan and all others are colors
	Cyan func(...interface{}) string
	//HIRed  and all others are colors
	HIRed func(...interface{}) string
	//HIGreen and all others are colors
	HIGreen func(...interface{}) string
	//HIYellow and all others are colors
	HIYellow func(...interface{}) string
	//HIBlue and all others are colors
	HIBlue func(...interface{}) string
	//HIMagenta and all others are colors
	HIMagenta func(...interface{}) string
	//HICyan and all others are colors
	HICyan func(...interface{}) string
	//Bold and all others are colors
	Bold func(...interface{}) string
	//Italic and all others are colors
	Italic func(...interface{}) string
	//Underline and all others are colors
	Underline func(...interface{}) string
)
View Source
var Changelog string
View Source
var Version string

Version is version...

Functions

func Center

func Center(str string, consoleWidth, stringWidth int)

Center centers the passed string in a console line.

func Clear

func Clear()

Clear runs a command to clear the console

func Error

func Error(err error, code int, safe bool)

Error prints out an error and a description for said error. This will not close/panic

func ExitWait

func ExitWait()

ExitWait waits for user to press enter before exiting program after an error or at end of program

func Flush

func Flush()

Flush flushes the console of all input

func Head()

Head prints out a nicer header formatted well

func PrintByte

func PrintByte(ogSize uint64, attach bool, del ...string) string

PrintByte prints out nicely a passed filesize:

ogSize - size of item
attach - should we attach the "kb"
del - if len(del) == 1, whatever is passed ("b","kb"/"k",...,"tb"/"t"), it will size it to that divisor

func PrintShortByte

func PrintShortByte(ogSize uint64, attach bool, del ...string) string

func QyORn

func QyORn(question string) bool

QyORn asks yes or no and returns bool

func VersionCheck

func VersionCheck()

func Wait

func Wait()

Wait pauses the program and waits for a user input

Types

This section is empty.

Jump to

Keyboard shortcuts

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