Documentation ¶
Index ¶
- func Base64Decode(encoded string) (string, error)
- func Base64Encode(text string) string
- func ClearDir(dir string) error
- func ConvertToJSON(item interface{}) (string, error)
- func DeleteDir(dir string) bool
- func DeleteFile(path string) error
- func DirExists(path string) bool
- func EnsureDir(dirName string, mode int) (bool, error)
- func EnsureTrailingSlash(dir string) string
- func Exec(command string) (string, string, error)
- func FileExists(path string) bool
- func FilterFiles(files, filters []string) []string
- func GenerateUUID4() string
- func GetHostname() (string, error)
- func GetVal(hash map[string]string, key, def string) string
- func InArray(val interface{}, array interface{}) bool
- func IsEmpty(item string) bool
- func LoadFromJSON(item interface{}, data []byte) error
- func MergeMaps(m1, m2 map[string]string) map[string]string
- func PathExists(path string) bool
- func Rand(min, max int) int
- func ReadFile(path string) (string, error)
- func RemoveStartingSlash(dir string) string
- func RemoveTrailingSlash(dir string) string
- func StoreFile(path, content string) error
- func TimeInSec(period string) int
- func Unset(a []string, i int) []string
- type Map
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶ added in v0.1.21
Base64Decode decodes 64 encoded string
func Base64Encode ¶ added in v0.1.21
Base64Encode encodes a string
func ConvertToJSON ¶
ConvertToJSON convert object to json
func EnsureTrailingSlash ¶
EnsureTrailingSlash ensure there is a trailing slash
func FileExists ¶
FileExists reports whether the named file exists
func FilterFiles ¶
FilterFiles filters files list based on specific sub-strings
func InArray ¶
func InArray(val interface{}, array interface{}) bool
InArray check if value is on array
func LoadFromJSON ¶
LoadFromJSON update object from json
func RemoveStartingSlash ¶
RemoveStartingSlash removes any starting slash
func RemoveTrailingSlash ¶
RemoveTrailingSlash removes any trailing slash
Types ¶
Click to show internal directories.
Click to hide internal directories.