From 5a96f4ccd3599a1f9a584ab9d453e2c86fc7e7df Mon Sep 17 00:00:00 2001 From: Daniel Underwood Date: Fri, 7 Jan 2022 13:46:03 -0500 Subject: [PATCH] Fix staticcheck complaints --- s3.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/s3.go b/s3.go index 37dab2c..02188f5 100644 --- a/s3.go +++ b/s3.go @@ -34,10 +34,16 @@ func (out S3Output) Write(feed *gofeed.Feed, item gofeed.Item, identifier string Region: aws.String(out.Region), S3ForcePathStyle: aws.Bool(true), } - newSession := session.New(s3Config) + newSession, err := session.NewSession(s3Config) + if err != nil { + return err + } s3Client := s3.New(newSession) data, err := json.Marshal(item) + if err != nil { + return err + } // TODO This should probably go in initialization pathTemplate, err := template.New(out.KeyFormat).Parse(out.KeyFormat)