Documentation
¶
Index ¶
- Constants
- Variables
- func CheckError(v any)
- func Colorize(text, color string) string
- func ExecuteAlias(command string, args []string, flags map[string]string, print bool)
- func FileExists(path string) bool
- func GetAlias(aliasName string) string
- func GetConfigurationType(path string) (string, error)
- func GetVariables(input string, vars map[string]string) string
- func GetVars() (map[string]string, error)
- func TruncateString(str string, maxLen int) string
Constants ¶
View Source
const ( YamlConfigurationType = "yaml" JsonConfigurationType = "json" TomlConfigurationType = "toml" )
Variables ¶
View Source
var Colors = map[string]string{
"red": "\033[38;5;210m",
"green": "\033[32m",
"yellow": "\033[38;5;221m",
"blue": "\033[38;5;110m",
"magenta": "\033[35m",
"cyan": "\033[36m",
"gray": "\033[90m",
"orange": "\033[38;5;214m",
"pink": "\033[38;5;207m",
"lime": "\033[38;5;10m",
"white": "\033[37m",
"reset": "\033[0m",
}
View Source
var ErrUnsupportedConfigType = errors.New("unsupported config type")
Functions ¶
func CheckError ¶
func CheckError(v any)
func ExecuteAlias ¶
func FileExists ¶
func GetConfigurationType ¶
GetConfigurationType функция для определения типа конфигурации
func TruncateString ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.