Documentation ¶
Index ¶
- Variables
- func ComputeMd5(filePath string) (string, error)
- func CopyFile(src, dst string) (err error)
- func CreateBolUser(username string, password string, server string) (string, error)
- func DecryptFromFile(password string, filename string) ([]byte, error)
- func EncryptToFile(toEncrypt []byte, password string, filename string) error
- func Exists(path string) bool
- func FormatDate(date time.Time) string
- func GetCurrentDate() string
- func GetPassword(passwordType string) string
- func GetRandomMD5Hash() string
- func GetUnixTimestamp() string
- func HashAndHex(s string) string
- func ParseDate(date string) (time.Time, error)
- func RandStringBytesMaskImprSrc(n int) string
- func ReFormatDate(date string) string
- func Shred(fileName string) error
- func StrExtract(sExper, sAdelim, sCdelim string, nOccur int) string
Constants ¶
This section is empty.
Variables ¶
var DATE_FORMAT = "2006-01-02 15:04:05"
Functions ¶
func ComputeMd5 ¶
ComputeMd5 returns the md5sum of a file http://dev.pawelsz.eu/2014/11/google-golang-compute-md5-of-file.html
func CopyFile ¶
CopyFile copies a file from src to dst. If src and dst files exist, and are the same, then return success. Otherise, attempt to create a hard link between the two files. If that fail, copy the file contents from src to dst.
func CreateBolUser ¶
CreateBolUser creates the specified user on the specified server
func Exists ¶
Exists returns whether the given file or directory exists or not from http://stackoverflow.com/questions/10510691/how-to-check-whether-a-file-or-directory-denoted-by-a-path-exists-in-golang
func FormatDate ¶
func GetCurrentDate ¶
func GetCurrentDate() string
func GetPassword ¶
func GetRandomMD5Hash ¶
func GetRandomMD5Hash() string
GetRandomMD5Hash returns 8 bytes of a random md5 hash
func GetUnixTimestamp ¶
func GetUnixTimestamp() string
func HashAndHex ¶
func RandStringBytesMaskImprSrc ¶
stole this from stack overflow.
func ReFormatDate ¶
func StrExtract ¶
StrExtract extracts a string between two other strings from http://stackoverflow.com/questions/21000277/extract-text-content-from-html-in-golang
Types ¶
This section is empty.