core

package
v0.0.3-dev Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ColorsTerm = &Colorsterm{
	Reset:        "\033[0m",
	FgRed:        "\033[31m",
	FgGreen:      "\033[32m",
	FgYellow:     "\033[33m",
	FgBlue:       "\033[34m",
	FgPurple:     "\033[35m",
	FgCyan:       "\033[36m",
	FgWhite:      "\033[37m",
	FgRedBold:    "\033[31;1m",
	FgGreenBold:  "\033[32;1m",
	FgYellowBold: "\033[33;1m",
	FgBlueBold:   "\033[34;1m",
	FgPurpleBold: "\033[35;1m",
	FgCyanBold:   "\033[36;1m",
	FgWhiteBold:  "\033[37;1m",
	BgRed:        "\033[41m",
	BgGreen:      "\033[42m",
	BgYellow:     "\033[43m",
	BgBlue:       "\033[44m",
	BgPurple:     "\033[45m",
	BgCyan:       "\033[46m",
	BgWhite:      "\033[47m",
}

Functions

func Alert

func Alert(a AlertContext)

Types

type AlertContext

type AlertContext struct {
	Type    string
	Code    uint
	Message string
}

type Colorsterm

type Colorsterm struct {
	Reset        string
	FgRed        string
	FgGreen      string
	FgYellow     string
	FgBlue       string
	FgPurple     string
	FgCyan       string
	FgWhite      string
	FgRedBold    string
	FgGreenBold  string
	FgYellowBold string
	FgBlueBold   string
	FgPurpleBold string
	FgCyanBold   string
	FgWhiteBold  string
	BgRed        string
	BgGreen      string
	BgYellow     string
	BgBlue       string
	BgPurple     string
	BgCyan       string
	BgWhite      string
}

type PromptContext

type PromptContext struct {
	Date        time.Time `json:"date"`
	CommandName string    `json:"commandName"`
	CommandArgs []string  `json:"commandArgs"`
	Line        string    `json:"line"`
}

func Prompt

func Prompt(prefix string) (PromptContext, error)

Jump to

Keyboard shortcuts

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