base

package module
v0.0.0-...-b5549f0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: GPL-3.0 Imports: 14 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayIdx

func ArrayIdx(slice []string, val string) int

func Chk

func Chk(err error, msgs ...string)

func ChkFatal

func ChkFatal(err error, msgs ...string)

func DnsQuery

func DnsQuery(host string) []string

func DnsQueryServer

func DnsQueryServer(host, dnsServer string) []string

func DnsQueryServerA

func DnsQueryServerA(host, dnsServer string) []string

func DnsQueryServerPtr

func DnsQueryServerPtr(ip, dnsServer string) []string

func ErrMsg

func ErrMsg(e error, msgs ...string) error

func FileExists

func FileExists(f string) bool

func GetAltPath

func GetAltPath(path string) string

func GetFile

func GetFile(file string) string

func GetLegalFilename

func GetLegalFilename(str string) string

func GetLocalIp

func GetLocalIp() string

func GetTimestamp

func GetTimestamp() string

func HasInt

func HasInt(arr []int, s int) bool

func HasString

func HasString(arr []string, s string) bool

func HumanSize

func HumanSize(b int64) string

func IsAny

func IsAny[T comparable](a T, b ...T) bool

func IsAnyInt

func IsAnyInt(a int, b ...int) bool

func IsAnyStr

func IsAnyStr(a string, b ...string) bool

func IsDirEmpty

func IsDirEmpty(name string) bool

func IsIp

func IsIp(host string) bool

func LogOutput

func LogOutput(logfile string) func()

func MvFile

func MvFile(src, dst string) error

func MvTree

func MvTree(src, dst string, removeEmpties bool)

func P

func P(s string, i ...any)

func PrintCmd

func PrintCmd(cmd []string)

func Ptr

func Ptr[T any](a T) *T
func PStr(s string) *string {
	return &s
}
func PInt(n int) *int {
	return &n
}
func PBool(b bool) *bool {
	return &b
}

func RenFile

func RenFile(src, dst string) error

func RmEmptyFolders

func RmEmptyFolders(root string)

func Run

func Run(args ...string) error

func SetFile

func SetFile(file, val string)

Types

This section is empty.

Directories

Path Synopsis
progress module

Jump to

Keyboard shortcuts

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