patchitup

package
v0.1.1-0...-e87653c Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2018 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string) (err error)

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

func Exists(path string) bool

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

func Filemd5Sum(pathToFile string) (result string, err error)

Filemd5Sum returns the md5 sum of a file

func HashSHA256

func HashSHA256(s []byte) string

func PatchUp

func PatchUp(address, username, pathToFile string) (err error)

PatchUp will take a filename and upload it to the server via a patch using the specified user.

func RandStringBytesMaskImprSrc

func RandStringBytesMaskImprSrc(n int) string

RandStringBytesMaskImprSrc prints a random string

func Run

func Run(port string) (err error)

Run will run the main program

func SetLogLevel

func SetLogLevel(level string) (err error)

SetLogLevel determines the log level

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.

Jump to

Keyboard shortcuts

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