utils

package
v0.0.0-...-f0e17bc Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBeTrue

func CheckBeTrue(b bool)

func CheckEnvSetting

func CheckEnvSetting(keys []string)

func CheckEqual

func CheckEqual(obj1 interface{}, obj2 interface{})

func CheckErr

func CheckErr(err error, explainErrMsg ...string)

func CheckExit0

func CheckExit0(sess *gexec.Session, waitTime time.Duration)

func CheckFuncBeTrue

func CheckFuncBeTrue(f func() bool, t time.Duration)

func CheckNotBeTrue

func CheckNotBeTrue(b bool)

func CheckNotEqual

func CheckNotEqual(obj1 interface{}, obj2 interface{})

func CheckNotExit0

func CheckNotExit0(sess *gexec.Session, waitTime time.Duration)

func CheckNotNil

func CheckNotNil(obj interface{})

func CreateTempFile

func CreateTempFile() string

func DeleteFileLocally

func DeleteFileLocally(filePath string)

DeleteFileLocally delete file for cloud apply

func Failf

func Failf(msg string)

func GetAllSubDirs

func GetAllSubDirs(rootPath string) ([]string, error)

func GetBinArch

func GetBinArch(filepath string) (string, error)

func GetBinPath

func GetBinPath(bin string) (string, error)

func GetFileDataLocally

func GetFileDataLocally(filePath string) string

GetFileDataLocally get file data for cloud apply

func GetLocalIpv4

func GetLocalIpv4() string

func GetPwd

func GetPwd() string

func IsFileExist

func IsFileExist(filename string) bool

func ListLocalHostAddrs

func ListLocalHostAddrs() (*[]net.Addr, error)

func LocalIP

func LocalIP(addrs *[]net.Addr) string

func Log

func Log(msg string)

func Logf

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

func MarshalYamlToFile

func MarshalYamlToFile(file string, obj interface{}) error

func MkTmpdir

func MkTmpdir(dir string) (string, error)

MkTmpdir creates a temporary directory.

func RemoveTempFile

func RemoveTempFile(file string)

func ToYalms

func ToYalms(bs string) (yamls []string)

func UnmarshalData

func UnmarshalData(metadata []byte) (map[string]interface{}, error)

func UnmarshalYamlFile

func UnmarshalYamlFile(file string, obj interface{}) error

func WriteFile

func WriteFile(fileName string, content []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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