Skip to content

Commit

Permalink
Merge pull request #1783 from stripe/richardm-format
Browse files Browse the repository at this point in the history
CI: run check-gofmt
  • Loading branch information
richardm-stripe authored Dec 13, 2023
2 parents 3586390 + 485566a commit 0250098
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ jobs:
- name: lint
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest &&
go install golang.org/x/tools/cmd/goimports@latest &&
$HOME/go/bin/staticcheck &&
make vet
make vet &&
make check-gofmt
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -77,4 +79,4 @@ jobs:
- uses: stripe/openapi/actions/notify-release@master
if: always()
with:
bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
36 changes: 18 additions & 18 deletions example/generated_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,10 @@ func TestCheckoutSessionsPost(t *testing.T) {
CancelURL: stripe.String("https://example.com/cancel"),
Mode: stripe.String(string(stripe.CheckoutSessionModePayment)),
ShippingOptions: []*stripe.CheckoutSessionShippingOptionParams{
&stripe.CheckoutSessionShippingOptionParams{
{
ShippingRate: stripe.String("shr_standard"),
},
&stripe.CheckoutSessionShippingOptionParams{
{
ShippingRateData: &stripe.CheckoutSessionShippingOptionShippingRateDataParams{
DisplayName: stripe.String("Standard"),
DeliveryEstimate: &stripe.CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateParams{
Expand All @@ -580,7 +580,7 @@ func TestCheckoutSessionsPost2(t *testing.T) {
params := &stripe.CheckoutSessionParams{
SuccessURL: stripe.String("https://example.com/success"),
LineItems: []*stripe.CheckoutSessionLineItemParams{
&stripe.CheckoutSessionLineItemParams{
{
Price: stripe.String("price_xxxxxxxxxxxxx"),
Quantity: stripe.Int64(2),
},
Expand Down Expand Up @@ -1628,7 +1628,7 @@ func TestPaymentLinksLineItemsGet(t *testing.T) {
func TestPaymentLinksPost(t *testing.T) {
params := &stripe.PaymentLinkParams{
LineItems: []*stripe.PaymentLinkLineItemParams{
&stripe.PaymentLinkLineItemParams{
{
Price: stripe.String("price_xxxxxxxxxxxxx"),
Quantity: stripe.Int64(1),
},
Expand All @@ -1642,7 +1642,7 @@ func TestPaymentLinksPost(t *testing.T) {
func TestPaymentLinksPost2(t *testing.T) {
params := &stripe.PaymentLinkParams{
LineItems: []*stripe.PaymentLinkLineItemParams{
&stripe.PaymentLinkLineItemParams{
{
Price: stripe.String("price_xxxxxxxxxxxxx"),
Quantity: stripe.Int64(1),
},
Expand Down Expand Up @@ -1872,8 +1872,8 @@ func TestPricesPost(t *testing.T) {
UnitAmount: stripe.Int64(2000),
Currency: stripe.String(string(stripe.CurrencyUSD)),
CurrencyOptions: map[string]*stripe.PriceCurrencyOptionsParams{
"uah": &stripe.PriceCurrencyOptionsParams{UnitAmount: stripe.Int64(5000)},
"eur": &stripe.PriceCurrencyOptionsParams{UnitAmount: stripe.Int64(1800)},
"uah": {UnitAmount: stripe.Int64(5000)},
"eur": {UnitAmount: stripe.Int64(1800)},
},
Recurring: &stripe.PriceRecurringParams{
Interval: stripe.String(string(stripe.PriceRecurringIntervalMonth)),
Expand Down Expand Up @@ -2052,7 +2052,7 @@ func TestQuotesPost(t *testing.T) {
params := &stripe.QuoteParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
LineItems: []*stripe.QuoteLineItemParams{
&stripe.QuoteLineItemParams{
{
Price: stripe.String("price_xxxxxxxxxxxxx"),
Quantity: stripe.Int64(2),
},
Expand Down Expand Up @@ -2523,9 +2523,9 @@ func TestSubscriptionSchedulesPost(t *testing.T) {
StartDate: stripe.Int64(1676070661),
EndBehavior: stripe.String(string(stripe.SubscriptionScheduleEndBehaviorRelease)),
Phases: []*stripe.SubscriptionSchedulePhaseParams{
&stripe.SubscriptionSchedulePhaseParams{
{
Items: []*stripe.SubscriptionSchedulePhaseItemParams{
&stripe.SubscriptionSchedulePhaseItemParams{
{
Price: stripe.String("price_xxxxxxxxxxxxx"),
Quantity: stripe.Int64(1),
},
Expand Down Expand Up @@ -2591,7 +2591,7 @@ func TestSubscriptionsPost(t *testing.T) {
params := &stripe.SubscriptionParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
Items: []*stripe.SubscriptionItemsParams{
&stripe.SubscriptionItemsParams{
{
Price: stripe.String("price_xxxxxxxxxxxxx"),
},
},
Expand Down Expand Up @@ -2633,7 +2633,7 @@ func TestTaxCalculationsPost(t *testing.T) {
params := &stripe.TaxCalculationParams{
Currency: stripe.String(string(stripe.CurrencyUSD)),
LineItems: []*stripe.TaxCalculationLineItemParams{
&stripe.TaxCalculationLineItemParams{
{
Amount: stripe.Int64(1000),
Reference: stripe.String("L1"),
},
Expand Down Expand Up @@ -2945,7 +2945,7 @@ func TestTestHelpersIssuingAuthorizationsCapturePost(t *testing.T) {
PassengerName: stripe.String("John Doe"),
Refundable: stripe.Bool(true),
Segments: []*stripe.TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightSegmentParams{
&stripe.TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightSegmentParams{
{
ArrivalAirportCode: stripe.String("SFO"),
Carrier: stripe.String("Delta"),
DepartureAirportCode: stripe.String("LAX"),
Expand All @@ -2967,7 +2967,7 @@ func TestTestHelpersIssuingAuthorizationsCapturePost(t *testing.T) {
Nights: stripe.Int64(2),
},
Receipt: []*stripe.TestHelpersIssuingAuthorizationCapturePurchaseDetailsReceiptParams{
&stripe.TestHelpersIssuingAuthorizationCapturePurchaseDetailsReceiptParams{
{
Description: stripe.String("Room charge"),
Quantity: stripe.Float64(1),
Total: stripe.Int64(200),
Expand Down Expand Up @@ -3106,7 +3106,7 @@ func TestTestHelpersIssuingTransactionsCreateForceCapturePost(t *testing.T) {
PassengerName: stripe.String("John Doe"),
Refundable: stripe.Bool(true),
Segments: []*stripe.TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightSegmentParams{
&stripe.TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightSegmentParams{
{
ArrivalAirportCode: stripe.String("SFO"),
Carrier: stripe.String("Delta"),
DepartureAirportCode: stripe.String("LAX"),
Expand All @@ -3128,7 +3128,7 @@ func TestTestHelpersIssuingTransactionsCreateForceCapturePost(t *testing.T) {
Nights: stripe.Int64(2),
},
Receipt: []*stripe.TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsReceiptParams{
&stripe.TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsReceiptParams{
{
Description: stripe.String("Room charge"),
Quantity: stripe.Float64(1),
Total: stripe.Int64(200),
Expand Down Expand Up @@ -3164,7 +3164,7 @@ func TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPost(t *testing.T) {
PassengerName: stripe.String("John Doe"),
Refundable: stripe.Bool(true),
Segments: []*stripe.TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightSegmentParams{
&stripe.TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightSegmentParams{
{
ArrivalAirportCode: stripe.String("SFO"),
Carrier: stripe.String("Delta"),
DepartureAirportCode: stripe.String("LAX"),
Expand All @@ -3186,7 +3186,7 @@ func TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPost(t *testing.T) {
Nights: stripe.Int64(2),
},
Receipt: []*stripe.TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsReceiptParams{
&stripe.TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsReceiptParams{
{
Description: stripe.String("Room charge"),
Quantity: stripe.Float64(1),
Total: stripe.Int64(200),
Expand Down

0 comments on commit 0250098

Please sign in to comment.