functions

package
v1.0.8-nightly Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alert

func Alert(name string, str ...interface{})

func Confirm

func Confirm(yes string, defaultValue string) bool

func CopyFile

func CopyFile(src, dst string) error

func Error added in v1.1.0

func Error(s string) error

func Errorf added in v1.1.0

func Errorf(format string, args ...interface{}) error

func Exec

func Exec(cmdString string, env map[string]string) ([]byte, error)

func ExecCmd

func ExecCmd(cmdString string, env map[string]string, verbose bool) error

func GetOption

func GetOption(op []Option, key string) string

func GetPrintRow

func GetPrintRow(res any, activeName string, printValue interface{}, prefix ...bool) string

func JsonConversion

func JsonConversion(from any, to any) error

func Log

func Log(str ...interface{})

func Logf

func Logf(format string, str ...interface{})

func MultiLine

func MultiLine(s string, length int) string

func NewE added in v1.1.0

func NewE(err error, s ...string) error

func Notify

func Notify(name string, str ...interface{})

func OpenUrl

func OpenUrl(url string) error

func ParseBoolFlag

func ParseBoolFlag(cmd *cobra.Command, flag string) bool

func ParseIntFlag

func ParseIntFlag(cmd *cobra.Command, flag string) int

func ParseKlFile

func ParseKlFile(cmd *cobra.Command) string

func ParseStringFlag

func ParseStringFlag(cmd *cobra.Command, flag string) string

func PrintError

func PrintError(err error)

func Printf

func Printf(format string, str ...interface{})

func Println

func Println(str ...interface{})

func Ptr

func Ptr[T any](v T) *T

func RemoveFromArray

func RemoveFromArray(target string, arr []string) []string

func TrimePref

func TrimePref(s string, length int) string

func Truncate

func Truncate(str string, length int) string

func Warn

func Warn(str ...interface{})

func Warnf

func Warnf(format string, str ...interface{})

func WinSudoExec

func WinSudoExec(cmdString string, env map[string]string) ([]byte, error)

func WithKlFile

func WithKlFile(cmd *cobra.Command)

func WithOutputVariant

func WithOutputVariant(cmd *cobra.Command)

Types

type Option

type Option struct {
	Key   string
	Value string
}

func MakeOption

func MakeOption(key, value string) Option

Jump to

Keyboard shortcuts

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