Skip to content

Commit 6355f55

Browse files
committed
fix lint
1 parent 8f8b4c2 commit 6355f55

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

.github/workflows/unit_test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
go: [ '1.15', '1.16' ]
14+
go: [ '1.15', '1.16', '1.17' ]
1515
name: Go ${{ matrix.go }} test
1616
steps:
1717
- uses: actions/checkout@v2

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ generate:
2525
update: update_all tidy
2626

2727
tidy:
28-
GO111MODULE=on GOPRIVATE="github.com/awa/*" go mod tidy
28+
GO111MODULE=on go mod tidy
2929

3030
update_all:
31-
GO111MODULE=on GOPRIVATE="github.com/awa/*" go get -v all
31+
GO111MODULE=on go get -v -u ./...

appstore/model.go

+6
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ func (n *numericString) UnmarshalJSON(b []byte) error {
1313
return nil
1414
}
1515

16+
// Environment is alias
1617
type Environment string
1718

19+
// list of Environment
1820
const (
1921
Sandbox Environment = "Sandbox"
2022
Production Environment = "Production"
2123
)
2224

2325
type (
26+
// IAPRequest is struct
2427
// https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html
2528
// The IAPRequest type has the request parameter
2629
IAPRequest struct {
@@ -140,6 +143,7 @@ type (
140143
PreorderDate
141144
}
142145

146+
// PendingRenewalInfo is struct
143147
// A pending renewal may refer to a renewal that is scheduled in the future or a renewal that failed in the past for some reason.
144148
PendingRenewalInfo struct {
145149
SubscriptionExpirationIntent string `json:"expiration_intent"`
@@ -169,6 +173,7 @@ type (
169173
IsRetryable bool `json:"is-retryable,omitempty"`
170174
}
171175

176+
// StatusResponse is struct
172177
// The HttpStatusResponse struct contains the status code returned by the store
173178
// Used as a workaround to detect when to hit the production appstore or sandbox appstore regardless of receipt type
174179
StatusResponse struct {
@@ -189,6 +194,7 @@ type (
189194
Status int `json:"status"`
190195
}
191196

197+
// ReceiptForIOS6 is struct
192198
ReceiptForIOS6 struct {
193199
AppItemID numericString `json:"app_item_id"`
194200
BID string `json:"bid"`

appstore/notification.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ const (
4545
NotificationProduction NotificationEnvironment = "PROD"
4646
)
4747

48+
// NotificationExpiresDate is struct
4849
type NotificationExpiresDate struct {
4950
ExpiresDateMS string `json:"expires_date"`
5051
ExpiresDateUTC string `json:"expires_date_formatted"`
5152
ExpiresDatePST string `json:"expires_date_formatted_pst"`
5253
}
5354

55+
// NotificationReceipt is struct
5456
type NotificationReceipt struct {
5557
UniqueIdentifier string `json:"unique_identifier"`
5658
AppItemID string `json:"app_item_id"`
@@ -73,6 +75,7 @@ type NotificationReceipt struct {
7375
CancellationDate
7476
}
7577

78+
// NotificationUnifiedReceipt is struct
7679
type NotificationUnifiedReceipt struct {
7780
Status int `json:"status"`
7881
Environment Environment `json:"environment"`
@@ -82,7 +85,7 @@ type NotificationUnifiedReceipt struct {
8285
}
8386

8487
// SubscriptionNotification is struct for
85-
// https://developer.apple.com/documentation/appstoreservernotifications/responsebody
88+
// https://developer.apple.com/documentation/appstoreservernotifications/responsebodyv1
8689
type SubscriptionNotification struct {
8790
Environment NotificationEnvironment `json:"environment"`
8891
NotificationType NotificationType `json:"notification_type"`

appstore/validator.go

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ type Client struct {
3434
httpCli *http.Client
3535
}
3636

37+
// list of errore
3738
var (
3839
ErrAppStoreServer = errors.New("AppStore server error")
3940

0 commit comments

Comments
 (0)