This commit is contained in:
Randall McPherson 2014-06-15 17:07:37 -04:00
Родитель eb090e7bfa
Коммит 8708bd5547
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -2,7 +2,7 @@ package s3gof3r
import ( import (
"encoding/json" "encoding/json"
"errors" "fmt"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"os" "os"
@ -83,7 +83,7 @@ func EnvKeys() (keys Keys, err error) {
SecretKey: os.Getenv("AWS_SECRET_ACCESS_KEY"), SecretKey: os.Getenv("AWS_SECRET_ACCESS_KEY"),
} }
if keys.AccessKey == "" || keys.SecretKey == "" { if keys.AccessKey == "" || keys.SecretKey == "" {
err = errors.New("Keys not set in environment: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY") err = fmt.Errorf("Keys not set in environment: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY")
} }
return return
} }