util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DIR_NAME       = ".mycmd"
	JSON_FILE_NAME = "cmd.json"
)

Variables

This section is empty.

Functions

func BlueFont

func BlueFont(str string) string

func ConfirmExecCmdsPrompt

func ConfirmExecCmdsPrompt(cmds []string) (shouldProceed bool, err error)

func GetJsonFilePath

func GetJsonFilePath() (jsonFilePath string, err error)

func GreenFont

func GreenFont(str string) string

func InitJson

func InitJson()

func InputPrompt

func InputPrompt(label string) (input string, err error)

func PrintErrMsg

func PrintErrMsg(msg string, err error)

func PrintSuccessMsg

func PrintSuccessMsg(msg string)

func PrintWarnMsg

func PrintWarnMsg(msg string)

func RedFont

func RedFont(str string) string

func SelectGroupPrompt

func SelectGroupPrompt(cmdsMap CmdsMap, additionals ...string) (group string, err error)

func SelectTaskPrompt

func SelectTaskPrompt(groupMap GroupMap) (task string, err error)

func YellowFont

func YellowFont(str string) string

Types

type Cmds

type Cmds []string

func PrepareCmds

func PrepareCmds(group *string, task *string) (cmds Cmds, err error)

type CmdsMap

type CmdsMap map[string]GroupMap

func GetCmdsMap

func GetCmdsMap() (cmdsMap CmdsMap, err error)

type GroupMap

type GroupMap map[string]Cmds

Jump to

Keyboard shortcuts

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