Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused assignment #39

Merged
merged 2 commits into from
Nov 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/integration/accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ func Test_V1_Accounts_GetMyProfile_should_get_own_profile(t *testing.T) {
func Test_V3_Accounts_GetMyFriends_should_get_some_accounts(t *testing.T) {
result, resp, err := clientV3.Accounts.GetMyFriends(context.Background(), spaceKey, "test", nil)
test(t, result, resp, err)
}
}
7 changes: 3 additions & 4 deletions tests/integration/likes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@ func Test_V1_Likes_GetLikesDiscover_should_get_some_DiscoverLikedPost(t *testing
test(t, result, resp, err)
}


func Test_V2_Likes_GetLikesGive_should_get_some_GiveLikedPost(t *testing.T) {
result, resp, err := clientV2.Likes.GetLikesGive(context.Background(), spaceKey, nil)
test(t, result, resp, err)
}

func Test_V2_Likes_GetLikesReceive_should_get_some_ReceiveLikedPost(t *testing.T) {
result, resp, err := clientV2.Likes.GetLikesReceive(context.Background(), spaceKey,nil)
result, resp, err := clientV2.Likes.GetLikesReceive(context.Background(), spaceKey, nil)
test(t, result, resp, err)
}

func Test_V2_Likes_GetLikesDiscover_should_get_some_DiscoverLikedPost(t *testing.T) {
result, resp, err := clientV2.Likes.GetLikesDiscover(context.Background(), spaceKey,nil)
result, resp, err := clientV2.Likes.GetLikesDiscover(context.Background(), spaceKey, nil)
test(t, result, resp, err)
}
}
4 changes: 2 additions & 2 deletions typetalk/internal/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ func (c *ClientCore) NewMultipartRequest(urlStr string, values map[string]io.Rea
var buffer bytes.Buffer
multipartWriter := multipart.NewWriter(&buffer)
for key, reader := range values {
var fieldWriter io.Writer
var err error = nil
if closable, ok := reader.(io.Closer); ok {
defer closable.Close()
}
var fieldWriter io.Writer
var err error
if file, ok := reader.(*os.File); ok {
if fieldWriter, err = multipartWriter.CreateFormFile(key, file.Name()); err != nil {
return nil, err
Expand Down