base

package
v0.0.0-...-630253c Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SEL_LIMIT int = 5
View Source
var Version string = "v1.4.0"

Functions

func Cpu

func Cpu() string

获取cpu架构

func Exec

func Exec(cmdStr string) string

执行命令并返回内容

func Execp

func Execp(cmdStr string) string

执行前输出命令

func FindAllByKey

func FindAllByKey(txt, key string, idx int) string

* 模糊查找指定列,并在该列中高亮显示, eg: * str="default ixx-demo-deployment-5df6465c5b-5xm5r 1/1 Running 2 75d" * ret = FindAllByKey(str, "ixx", 1) * "default [red]ixx[red]-demo-deployment-5df6465c5b-5xm5r 1/1 Running 2 75d"

func FindByKey

func FindByKey(ret, key string) string

整行模糊查找指定key, 并高亮显示

func FindByKeySetColor

func FindByKeySetColor(ret, key, col string) string

func FindColByKey

func FindColByKey(txt, key string, idx int) string

过滤模糊的列,并供用户选择,最终返回唯一的选择值

func Help

func Help(key string)

func HelpZh

func HelpZh(key string)

func Run

func Run(cmdStr string)

执行命令并切换到命令进程

func Sys

func Sys() string

获取当前运行系统

func V

func V()

Types

This section is empty.

Jump to

Keyboard shortcuts

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