Skip to content

Commit

Permalink
Merge pull request #69 from volcengine/feat/rds
Browse files Browse the repository at this point in the history
Feat/rds
  • Loading branch information
xuyaming0800 authored Mar 3, 2023
2 parents 4c7da54 + 67bdefa commit 88a9140
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions common/common_volcengine_tos_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ func (u *Tos) newTosClient(domain string) *client.Client {
}

func (u *Tos) DoTosCall(info TosInfo, input *map[string]interface{}) (output *map[string]interface{}, err error) {
var content *os.File
defer func() {

if content != nil {
err = content.Close()
}
}()
c := u.newTosClient(info.Domain)
trueInput := make(map[string]interface{})
Expand Down Expand Up @@ -133,7 +136,7 @@ func (u *Tos) DoTosCall(info TosInfo, input *map[string]interface{}) (output *ma
}

if info.ContentPath != "" && (op.HTTPMethod == "PUT" || op.HTTPMethod == "POST") {
content, _ := os.Open(info.ContentPath)
content, _ = os.Open(info.ContentPath)
req.Body = content
req.HTTPRequest.Header.Set("Content-Length", strconv.FormatInt(u.tryResolveLength(content), 10))
}
Expand Down
2 changes: 1 addition & 1 deletion common/common_volcengine_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package common

const (
TerraformProviderName = "terraform-provider-volcengine"
TerraformProviderVersion = "0.0.58"
TerraformProviderVersion = "0.0.59"
)

0 comments on commit 88a9140

Please sign in to comment.