From 4b4a57eba7b9e9cb7bb91d3dd2982c683c65edf3 Mon Sep 17 00:00:00 2001 From: warjiang <1096409085@qq.com> Date: Wed, 25 Oct 2023 11:26:07 +0800 Subject: [PATCH] feat: double check options to ensure options not nil --- amazon.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amazon.go b/amazon.go index 901a6a0..731cc08 100644 --- a/amazon.go +++ b/amazon.go @@ -81,7 +81,7 @@ func NewAmazonS3BackendWithOptions(bucket string, prefix string, region string, client = &http.Client{Transport: tr} } s3ForcePathStyle := endpoint != "" - if options.S3ForcePathStyle != nil { + if options != nil && options.S3ForcePathStyle != nil { s3ForcePathStyle = *options.S3ForcePathStyle } service := s3.New(session.New(), &aws.Config{