Merge pull request #8832 from alrs/post-processor-deprecated-session-new

post-processor/digitalocean-import/post-processor.go: Replace Deprecated session.New()
This commit is contained in:
Megan Marsh 2020-03-03 13:11:54 -08:00 committed by GitHub
commit fc110e747f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -198,7 +198,10 @@ func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, artifact
logger: log.New(os.Stderr, "", log.LstdFlags),
},
}
sess := session.New(spacesConfig)
sess, err := session.NewSession(spacesConfig)
if err != nil {
return nil, false, false, err
}
ui.Message(fmt.Sprintf("Uploading %s to spaces://%s/%s", source, p.config.SpaceName, p.config.ObjectName))
err = uploadImageToSpaces(source, p, sess)