utils

package
v0.0.0-...-f3ad2b4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2015 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsPath

func AbsPath(p string) (string, apperror.Error)

func BuildFileMD5Hash

func BuildFileMD5Hash(path string) (string, apperror.Error)

func Canonicalize

func Canonicalize(str string) string

func CopyFile

func CopyFile(sourcePath, targetPath string) apperror.Error

func FileExists

func FileExists(path string) (bool, apperror.Error)

func GetMapDictKey

func GetMapDictKey(rawData interface{}, key string) (map[string]interface{}, bool)

func GetMapFloat64Key

func GetMapFloat64Key(rawData interface{}, key string) (float64, bool)

func GetMapKey

func GetMapKey(rawData interface{}, key string) (interface{}, bool)

func GetMapStringKey

func GetMapStringKey(rawData interface{}, key string) string

func InterfaceToModelSlice

func InterfaceToModelSlice(items []interface{}) []kit.Model

func ListFiles

func ListFiles(path string) ([]string, apperror.Error)

func ReadFile

func ReadFile(path string) ([]byte, apperror.Error)

func StrIn

func StrIn(haystack []string, needle string) bool

func UUIdv4

func UUIdv4() string

func WriteFile

func WriteFile(p string, content []byte, createDir bool) apperror.Error

func WriteTmpFile

func WriteTmpFile(content []byte, name string) (string, apperror.Error)

Write contents to a tmp file and return the path to the file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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