cli

package
v1.5.12 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 27 Imported by: 16

Documentation

Index

Constants

View Source
const (
	BG     = "bg"
	FG     = "fg"
	COLOR  = "color"
	BLACK  = "black"
	WHITE  = "white"
	BLUE   = "blue"
	RED    = "red"
	GRAY   = "gray"
	CYAN   = "cyan"
	GREEN  = "green"
	SILVER = "silver"
	PURPLE = "purple"
	YELLOW = "yellow"
	RANDOM = "random"
	GLASS  = "#0000"
)
View Source
const (
	DIR = "dir"
	ENV = "env"
	API = "api"
	PID = "pid"
	PWD = "pwd"
)
View Source
const (
	BUILD = "build"
	ORDER = "order"
	SPAWN = "spawn"
	CHECK = "check"
	BENCH = "bench"
	PPROF = "pprof"

	TIMEOUT = "timeout"
	STATUS  = "status"
	ERROR   = "error"
	CLEAR   = "clear"
	RELOAD  = "reload"
	RESTART = "restart"

	DELAY = "delay"
	BEGIN = "begin"
	START = "start"
	OPEN  = "open"
	CLOSE = "close"
	STOP  = "stop"
	END   = "end"

	MAIN = "main"
	CODE = "code"
	COST = "cost"
	BACK = "back"
	FROM = "from"
)
View Source
const (
	CMD     = "cmd"
	OSID    = "osid"
	UBUNTU  = "ubuntu"
	CENTOS  = "centos"
	ALPINE  = "alpine"
	BUSYBOX = "busybox"
	RELEASE = "release"
)
View Source
const (
	MAKE = "make"
	TEST = "test"
	HOST = "host"
	CONF = "conf"
	BOOT = "boot"
	NODE = "node"
)
View Source
const (
	GOARCH  = "GOARCH"
	AMD64   = "amd64"
	X86     = "386"
	ARM     = "arm"
	ARM64   = "arm64"
	MIPSLE  = "mipsle"
	GOOS    = "GOOS"
	LINUX   = "linux"
	DARWIN  = "darwin"
	WINDOWS = "windows"
)
View Source
const (
	PATH  = "PATH"
	HOME  = "HOME"
	USER  = "USER"
	TERM  = "TERM"
	SHELL = "SHELL"
)
View Source
const (
	CTX_SHY = "ctx_shy"
	CTX_COM = "ctx_com"
	CTX_DEV = "ctx_dev"
	CTX_OPS = "ctx_ops"
	CTX_ARG = "ctx_arg"
	CTX_PID = "ctx_pid"
	CTX_LOG = "ctx_log"
	CTX_POD = "ctx_pod"
	CTX_ENV = "ctx_env"

	CTX_DAEMON = "ctx_daemon"
)
View Source
const (
	HOSTNAME = "hostname"
	PATHNAME = "pathname"
	USERNAME = "username"
)
View Source
const (
	IFCONFIG = "ifconfig"
	DISKINFO = "diskinfo"
	HOSTINFO = "hostinfo"
	USERINFO = "userinfo"
	PROCINFO = "procinfo"
	PROCKILL = "prockill"
	BOOTINFO = "bootinfo"
	MAXPROCS = "maxprocs"
)
View Source
const (
	CMD_DIR = "cmd_dir"
	CMD_ENV = "cmd_env"

	CMD_INPUT  = "cmd_input"
	CMD_OUTPUT = "cmd_output"
	CMD_ERRPUT = "cmd_errput"

	CMD_ERR = "cmd_err"
	CMD_OUT = "cmd_out"

	MAN   = "man"
	FIND  = "find"
	GREP  = "grep"
	EXEC  = "exec"
	REST  = "rest"
	OPENS = "opens"
)
View Source
const CLI = "cli"
View Source
const DAEMON = "daemon"
View Source
const FOREVER = "forever"
View Source
const MIRRORS = "mirrors"
View Source
const QRCODE = "qrcode"
View Source
const RUNTIME = "runtime"
View Source
const (
	SIZE = "size"
)
View Source
const SYSTEM = "system"

Variables

View Source
var ENV_LIST = []string{TERM, SHELL, CTX_SHY, CTX_COM, CTX_DEV, CTX_OPS, CTX_ARG, CTX_PID, CTX_DAEMON}
View Source
var Index = &ice.Context{Name: CLI, Help: "命令模块"}

Functions

func BinPath added in v0.9.8

func BinPath(arg ...string) string

func Color

func Color(m *ice.Message, c string, str ice.Any) string

func ColorGreen

func ColorGreen(m *ice.Message, str ice.Any) string

func ColorRed

func ColorRed(m *ice.Message, str ice.Any) string

func ColorYellow

func ColorYellow(m *ice.Message, str ice.Any) string

func IsAlpine added in v1.1.2

func IsAlpine(m *ice.Message, arg ...string) bool

func IsCentos added in v1.3.2

func IsCentos(m *ice.Message, arg ...string) bool

func IsSuccess added in v0.6.1

func IsSuccess(m *ice.Message) bool

func IsSystem added in v1.4.4

func IsSystem(m *ice.Message, arg ...string) bool

func IsUbuntu added in v1.4.0

func IsUbuntu(m *ice.Message, arg ...string) bool

func IsWindows added in v1.5.5

func IsWindows() bool

func NodeInfo

func NodeInfo(m *ice.Message, arg ...string)

func Opens added in v1.5.5

func Opens(m *ice.Message, arg ...string)

func ParseCliColor added in v1.5.5

func ParseCliColor(color string) string

func ParseColor added in v1.5.5

func ParseColor(color string) color.Color

func SystemCmds added in v1.4.3

func SystemCmds(m *ice.Message, cmds string, args ...ice.Any) string

func SystemExec added in v1.4.3

func SystemExec(m *ice.Message, arg ...string) string

func SystemFind added in v0.9.6

func SystemFind(m *ice.Message, bin string, dir ...string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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