Documentation
¶
Index ¶
- func CopyFile(srcPath string, destPath string) error
- func DeserializeJson(serializedJson string) (map[string]interface{}, error)
- func FileExists(filePath string) (bool, fs.FileInfo)
- func GetEnvOrElse(name, orElse string) string
- func IsDir(fileInfo fs.FileInfo) bool
- func IsDirAndWritable(filePath string, fileInfo fs.FileInfo) (bool, error)
- func IsDirEmpty(path string) (bool, error)
- func IsSocket(fileInfo fs.FileInfo) bool
- func IsValidDirName(name string) bool
- func IsValidRegistryAddress(input string) bool
- func IsValidTag(input string) bool
- func IsWritable(path string) (bool, error)
- func PrimaryIp() (string, error)
- func RandomString(length int, includeUpper bool, includeNumbers bool) string
- func SerializeJson(object map[string]interface{}) (string, error)
- func SetEnvVariables(variables map[string]string) error
- func Unzip(archivePath string, destPath string) error
- type OsArch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeserializeJson ¶
DeserializeJson deserializes a URL-encoded JSON string to a map.
func FileExists ¶
FileExists returns if the given path exists.
func GetEnvOrElse ¶
GetEnvOrElse gets the value from the os environment or use the else value if variable is not present.
func IsDirAndWritable ¶
IsDirAndWritable checks if the file is a directory and is writable.
func IsDirEmpty ¶
IsDirEmpty checks if a given directory is empty.
func IsValidDirName ¶
IsValidDirName checks if the given name is a valid dir name.
func IsValidRegistryAddress ¶
IsValidRegistryAddress checks if the input string is a valid registry address.
func IsValidTag ¶
IsValidTag checks if the input string is a valid tag.
func IsWritable ¶
IsWritable checks if the directory at the given path is writable. Important: This function uses the unix package, which only works on unix systems.
func RandomString ¶
RandomString generates a random string of a given length.
func SerializeJson ¶
SerializeJson serializes a map to a URL-encoded JSON string.
func SetEnvVariables ¶
SetEnvVariables sets variables to the os environment.