diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2016-10-16 16:47:09 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2016-10-17 12:39:09 +0100 |
commit | a427038700c0f1c080090a8158c1a793923aa03c (patch) | |
tree | 1309e201063f16e75266e571ea1733ce5eb49ce5 /server/wkfs/s3fs | |
parent | d6d54ed0bcf3b583fe681db790740cef137401d3 (diff) |
Unmarshal the config using mapstructure directly.
Avoid unmarshalling into an intermediate struct.
Better tests.
Diffstat (limited to 'server/wkfs/s3fs')
-rw-r--r-- | server/wkfs/s3fs/s3.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/wkfs/s3fs/s3.go b/server/wkfs/s3fs/s3.go index a71d874..331b55f 100644 --- a/server/wkfs/s3fs/s3.go +++ b/server/wkfs/s3fs/s3.go @@ -21,6 +21,10 @@ import ( // Register the /s3/ filesystem as a well-known filesystem. func Register(config *config.AWS) { + if config == nil { + registerBrokenFS(errors.New("aws credentials not found")) + return + } ac := &aws.Config{} // If region is unset the SDK will attempt to read the region from the environment. if config.Region != "" { |