Skip to content

Commit

Permalink
Merge pull request #162 from alingse-forks/fix-some-go-lint
Browse files Browse the repository at this point in the history
fix golang lint
  • Loading branch information
takecy committed Apr 22, 2022
2 parents 5c25522 + 6a9511b commit 7768b50
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 0 additions & 3 deletions amazon/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (
func TestHandle497Error(t *testing.T) {
t.Parallel()
var expected, actual error
client := New("developerSecret")

server, client := testTools(
497,
"{\"message\":\"Purchase token/app user mismatch\",\"status\":false}",
Expand All @@ -39,7 +37,6 @@ func TestHandle497Error(t *testing.T) {
func TestHandle400Error(t *testing.T) {
t.Parallel()
var expected, actual error
client := New("developerSecret")

server, client := testTools(
400,
Expand Down
4 changes: 2 additions & 2 deletions hms/modifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ func (c *Client) RevokeSubscription(ctx context.Context, purchaseToken, subscrip
// ModifySubscriptionResponse JSON response from {rootUrl}/sub/applications/v2/purchases/stop|delay|returnFee|withdrawal
type ModifySubscriptionResponse struct {
ResponseCode string `json:"responseCode"`
ResponseMessage string `json:"responseMessage;omitempty"`
NewExpirationTime int64 `json:"newExpirationTime;omitempty"`
ResponseMessage string `json:"responseMessage,omitempty"`
NewExpirationTime int64 `json:"newExpirationTime,omitempty"`
}

// public method to query {rootUrl}/sub/applications/v2/purchases/stop|delay|returnFee|withdrawal
Expand Down
4 changes: 3 additions & 1 deletion hms/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,11 @@ func (c *Client) GetCanceledOrRefundedPurchases(
}

url := c.getRootOrderURLByFlag(accountFlag) + "/applications/v2/purchases/cancelledList"
bodyBytes, err := c.sendJSONRequest(ctx, url, bodyMap)
var bodyBytes []byte
bodyBytes, err = c.sendJSONRequest(ctx, url, bodyMap)
if err != nil {
// log.Printf("GetCanceledOrRefundedPurchases(): Encounter error: %s", err)
return
}

var cpl CanceledPurchaseList // temporary variable to store api query result
Expand Down

0 comments on commit 7768b50

Please sign in to comment.