utils

package
v0.0.0-...-081de99 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultColor = ColorConf{0, 0, 0}
View Source
var DefaultErrColor = ColorConf{0, 0, 31}
View Source
var DefaultSucColor = ColorConf{0, 0, 32}

Functions

func CheckPid

func CheckPid(pid string) bool

func ExecShell

func ExecShell(command string) string

func PrintfColor

func PrintfColor(conf ColorConf, msg string)

printf

func PrintfColorMsg

func PrintfColorMsg(message Message)

func PrintlnColor

func PrintlnColor(conf ColorConf, msg string)

println

func PrintlnColorMsg

func PrintlnColorMsg(message Message)

Types

type ColorConf

type ColorConf struct {
	Conf int
	Bg   int
	Text int
}

type Message

type Message struct {
	Conf ColorConf
	Msg  string
	Show bool
}

func GenerateMessage

func GenerateMessage(conf ColorConf, msg string) Message

Jump to

Keyboard shortcuts

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