Documentation ¶
Index ¶
- Constants
- func CopyDir(source string, dest string) (err error)
- func CopyFile(source string, dest string) (err error)
- func GetCWD() string
- func GetTimeStamp() string
- func LoadByteFiles(dirname string, ext string) ([]byte, error)
- func LoadBytesDir(dirname string) ([]byte, error)
- func LoadFilesInfo(path string) ([]map[string]interface{}, error)
- func LoadJson(path string, obj interface{}) error
- func LoadListFiles(path string, ext string, removeExtension bool) ([]string, error)
- func LoadYaml(path string, obj interface{}) error
- func RemoveDuplicates(elements []string) []string
- func RenameIfExists(path string)
- func SaveJson(path string, obj interface{}) error
- func SaveYaml(path string, obj interface{}) error
Constants ¶
const TIME_LAYOUT = "Jan-02-2006_15-04-05-MST"
Variables ¶
This section is empty.
Functions ¶
func GetTimeStamp ¶
func GetTimeStamp() string
GetTimeStamp - return timeStamp string with current date
func LoadByteFiles ¶
LoadByteFiles - read files from folder and return bytes, filtered by extension
func LoadBytesDir ¶
LoadBytesDir - read files from folder
func LoadFilesInfo ¶
LoadFilesInfo - loads a directory recursivily and returns a map[string]interface - list of infos path : directory path to start create the list Example : LoadFilesInfo("/Users/test")
func LoadJson ¶
LoadJson - Load a json file and return into a inrterface Example : LoadJson("./file.json", &obj)
func LoadListFiles ¶
LoadListFiles - loads a directory recursivily and returns a list path : directory path to start create the list ext : extension to filter, only files with a especific extension will be included into list , other files will bo ignored removeExtension : if true remove extension form the file name Example : LoadListFiles("/Users/test", ".html", true)
func LoadYaml ¶
LoadYaml - Load yaml file into a interface{} Example : LoadYaml("./file.yaml", &obj)
func RemoveDuplicates ¶
RemoveDuplicates - remove duplicate strings from slice string
Types ¶
This section is empty.