util

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode added in v0.12.0

func Base64Decode(value string) (string, bool)

func Base64Encode added in v0.12.0

func Base64Encode(value string) string

func CopyFile added in v0.8.0

func CopyFile(from string, to string) (int64, error)

func CreateBaseDir added in v0.5.0

func CreateBaseDir(path string) error

func CreateDir added in v0.11.0

func CreateDir(dir string) error

func DeleteDir added in v0.8.0

func DeleteDir(path string) error

func DeleteFile added in v0.8.0

func DeleteFile(path string) error

func EncodeJson added in v0.5.0

func EncodeJson(data interface{}) (string, error)

func EncodeJsonIndent added in v0.5.0

func EncodeJsonIndent(data interface{}) (string, error)

func EncodeYaml added in v0.5.0

func EncodeYaml(data interface{}) (string, error)

func Expand added in v0.10.0

func Expand(raw string, inputs map[string]string) (string, error)

TODO refactor test in box and task

func FindOpenPort added in v0.6.0

func FindOpenPort(port string) (string, error)

func InterruptHandler added in v0.12.1

func InterruptHandler(callback func())

func IotaToValues added in v0.8.0

func IotaToValues[T comparable](kv map[T]string) []string

func OpenFile added in v0.11.0

func OpenFile(filePath string) (io.WriteCloser, error)

func PathNotExist added in v0.12.0

func PathNotExist(path string) bool

func RandomAlphanumeric added in v0.9.0

func RandomAlphanumeric(size int) string

func ReadFile added in v0.5.0

func ReadFile(path string) (string, error)

func Sleep added in v0.12.0

func Sleep(seconds int)

func SplitKeyValue added in v0.9.0

func SplitKeyValue(kv string) (string, string, error)

func ToLowerKebabCase added in v0.10.0

func ToLowerKebabCase(value string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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