From fc20dd72d6926650e7c4a6a52929b372198fb4d3 Mon Sep 17 00:00:00 2001 From: tgic Date: Tue, 16 Jun 2015 14:06:04 +0800 Subject: [PATCH] check access key and secret before run --- docs/storage/driver/oss/oss.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/storage/driver/oss/oss.go b/docs/storage/driver/oss/oss.go index 91ab4b1a..21a7e32a 100644 --- a/docs/storage/driver/oss/oss.go +++ b/docs/storage/driver/oss/oss.go @@ -104,11 +104,11 @@ func FromParameters(parameters map[string]interface{}) (*Driver, error) { // be summoned when GetAuth is called) accessKey, ok := parameters["accesskeyid"] if !ok { - accessKey = "" + return nil, fmt.Errorf("No accesskeyid parameter provided") } secretKey, ok := parameters["accesskeysecret"] if !ok { - secretKey = "" + return nil, fmt.Errorf("No accesskeysecret parameter provided") } regionName, ok := parameters["region"]