From 0a24f4eb2efb6afac6b6558144bca2fb52431e8b Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Tue, 7 Nov 2017 16:05:43 -0800 Subject: [PATCH] don't shadow package name --- builder/amazon/common/access_config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/amazon/common/access_config.go b/builder/amazon/common/access_config.go index ca589c7bf..73e50b862 100644 --- a/builder/amazon/common/access_config.go +++ b/builder/amazon/common/access_config.go @@ -75,13 +75,13 @@ func (c *AccessConfig) Session() (*session.Session, error) { } } - if session, err := session.NewSessionWithOptions(opts); err != nil { + if sess, err := session.NewSessionWithOptions(opts); err != nil { return nil, err - } else if *session.Config.Region == "" { + } else if *sess.Config.Region == "" { return nil, fmt.Errorf("Could not find AWS region, make sure it's set.") } else { - log.Printf("Found region %s", *session.Config.Region) - c.session = session + log.Printf("Found region %s", *sess.Config.Region) + c.session = sess } return c.session, nil