diff options
Diffstat (limited to 'app/utilities.go')
| -rw-r--r-- | app/utilities.go | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/app/utilities.go b/app/utilities.go index a3c3617..b34efd8 100644 --- a/app/utilities.go +++ b/app/utilities.go @@ -17,22 +17,7 @@ import ( "time" ) -/* -type errorString struct { - s string -} - -func (e *errorString) Error() string { - return e.s -} - -// New returns an error that formats as the given text. -func New(text string) error { - return &errorString{text} -} -*/ - -// Returns headers as map and the content of a webpage as string +// Returns the response from a GET request plus the headers as map and the content as string func HttpGet(url string) (*http.Response, string, error) { r, err := http.Get(url) if err != nil { @@ -59,6 +44,7 @@ func Md5Hash(content string) string { // Creates a random string func RandomKey() string { + rand.Seed(time.Now().UTC().UnixNano()) letters := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") key := make([]rune, 40) for i := range key { |
