Skip to content

Commit

Permalink
change variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
qinru-wang committed Apr 19, 2021
1 parent 3e71fd5 commit 2576de8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chatwork/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
)

func FilesPost(info ApiInfo, message string, fileName string, fileText string) (Response, error) {
func FilesPost(info ApiInfo, message string, fileName string, fileBody string) (Response, error) {
apiURL := fmt.Sprintf(ChatWorkAPIBaseURL, Version, "rooms", info.RoomId, "files")
// mlutipart Bodyを作る
var buffer bytes.Buffer
Expand All @@ -23,7 +23,7 @@ func FilesPost(info ApiInfo, message string, fileName string, fileText string) (

// パートを追加する
partwriter, _ := mwriter.CreatePart(mheader)
io.Copy(partwriter, strings.NewReader(fileText))
io.Copy(partwriter, strings.NewReader(fileBody))

// パートを追加する
mwriter.WriteField("message", message)
Expand Down

0 comments on commit 2576de8

Please sign in to comment.