Documentation ¶
Index ¶
- func CopyFile(src, dst string) (err error)
- func Exists(path string) bool
- func Filemd5Sum(pathToFile string) (result string, err error)
- func HashSHA256(s []byte) string
- func PatchUp(address, username, pathToFile string) (err error)
- func RandStringBytesMaskImprSrc(n int) string
- func Run(port string) (err error)
- func SetLogLevel(level string) (err error)
- func UserHomeDir() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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. from http://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file-in-golang
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 Filemd5Sum ¶
Filemd5Sum returns the md5 sum of a file
func HashSHA256 ¶
func PatchUp ¶
PatchUp will take a filename and upload it to the server via a patch using the specified user.
func RandStringBytesMaskImprSrc ¶
RandStringBytesMaskImprSrc prints a random string
func UserHomeDir ¶
func UserHomeDir() string
UserHomeDir returns the user home directory taken from go1.8c2 https://stackoverflow.com/a/41786440
Types ¶
This section is empty.