4
4
"bufio"
5
5
"encoding/json"
6
6
"fmt"
7
- "io/ioutil "
7
+ "io"
8
8
"os"
9
9
"path/filepath"
10
10
"time"
@@ -13,25 +13,25 @@ import (
13
13
)
14
14
15
15
type Fixture struct {
16
- Addresses map [string ]* easypost.Address `json:"addresses,omitempty" url:"addresses,omitempty"`
17
- CarrierAccounts map [string ]* easypost.CarrierAccount `json:"carrier_accounts,omitempty" url:"carrier_accounts,omitempty"`
18
- CarrierStrings map [string ]string `json:"carrier_strings,omitempty" url:"carrier_strings,omitempty"`
19
- Claims map [string ]* easypost.CreateClaimParameters `json:"claims,omitempty" url:"claims,omitempty"`
20
- CustomsInfos map [string ]* easypost.CustomsInfo `json:"customs_infos,omitempty" url:"customs_infos,omitempty"`
21
- CustomsItems map [string ]* easypost.CustomsItem `json:"customs_items,omitempty" url:"customs_items,omitempty"`
22
- CreditCards map [string ]* easypost.CreditCardOptions `json:"credit_cards,omitempty" url:"credit_cards,omitempty"`
23
- FormOptions map [string ]map [string ]interface {} `json:"form_options,omitempty" url:"form_options,omitempty"`
24
- Insurances map [string ]* easypost.Insurance `json:"insurances,omitempty" url:"insurances,omitempty"`
25
- Orders map [string ]* easypost.Order `json:"orders,omitempty" url:"orders,omitempty"`
26
- PageSizes map [string ]int `json:"page_sizes,omitempty" url:"page_sizes,omitempty"`
27
- Parcels map [string ]* easypost.Parcel `json:"parcels,omitempty" url:"parcels,omitempty"`
28
- Pickups map [string ]* easypost.Pickup `json:"pickups,omitempty" url:"pickups,omitempty"`
29
- ReportTypes map [string ]string `json:"report_types,omitempty" url:"report_types,omitempty"`
30
- ServiceNames map [string ]map [string ]string `json:"service_names,omitempty" url:"service_names,omitempty"`
31
- Shipments map [string ]* easypost.Shipment `json:"shipments,omitempty" url:"shipments,omitempty"`
32
- TaxIdentifiers map [string ]* easypost.TaxIdentifier `json:"tax_identifiers,omitempty" url:"tax_identifiers,omitempty"`
33
- Users map [string ]* easypost.UserOptions `json:"users,omitempty" url:"users,omitempty"`
34
- Webhooks map [string ]interface {} `json:"webhooks,omitempty" url:"webhooks,omitempty"`
16
+ Addresses map [string ]* easypost.Address `json:"addresses,omitempty" url:"addresses,omitempty"`
17
+ CarrierAccounts map [string ]* easypost.CarrierAccount `json:"carrier_accounts,omitempty" url:"carrier_accounts,omitempty"`
18
+ CarrierStrings map [string ]string `json:"carrier_strings,omitempty" url:"carrier_strings,omitempty"`
19
+ Claims map [string ]* easypost.CreateClaimParameters `json:"claims,omitempty" url:"claims,omitempty"`
20
+ CustomsInfos map [string ]* easypost.CustomsInfo `json:"customs_infos,omitempty" url:"customs_infos,omitempty"`
21
+ CustomsItems map [string ]* easypost.CustomsItem `json:"customs_items,omitempty" url:"customs_items,omitempty"`
22
+ CreditCards map [string ]* easypost.CreditCardOptions `json:"credit_cards,omitempty" url:"credit_cards,omitempty"`
23
+ FormOptions map [string ]map [string ]interface {} `json:"form_options,omitempty" url:"form_options,omitempty"`
24
+ Insurances map [string ]* easypost.Insurance `json:"insurances,omitempty" url:"insurances,omitempty"`
25
+ Orders map [string ]* easypost.Order `json:"orders,omitempty" url:"orders,omitempty"`
26
+ PageSizes map [string ]int `json:"page_sizes,omitempty" url:"page_sizes,omitempty"`
27
+ Parcels map [string ]* easypost.Parcel `json:"parcels,omitempty" url:"parcels,omitempty"`
28
+ Pickups map [string ]* easypost.Pickup `json:"pickups,omitempty" url:"pickups,omitempty"`
29
+ ReportTypes map [string ]string `json:"report_types,omitempty" url:"report_types,omitempty"`
30
+ ServiceNames map [string ]map [string ]string `json:"service_names,omitempty" url:"service_names,omitempty"`
31
+ Shipments map [string ]* easypost.Shipment `json:"shipments,omitempty" url:"shipments,omitempty"`
32
+ TaxIdentifiers map [string ]* easypost.TaxIdentifier `json:"tax_identifiers,omitempty" url:"tax_identifiers,omitempty"`
33
+ Users map [string ]* easypost.UserOptions `json:"users,omitempty" url:"users,omitempty"`
34
+ Webhooks map [string ]interface {} `json:"webhooks,omitempty" url:"webhooks,omitempty"`
35
35
}
36
36
37
37
// Reads fixture data from the fixtures JSON file
@@ -49,7 +49,7 @@ func readFixtureData() Fixture {
49
49
50
50
defer func () { _ = data .Close () }()
51
51
52
- byteData , _ := ioutil .ReadAll (data )
52
+ byteData , _ := io .ReadAll (data )
53
53
54
54
var fixtures Fixture
55
55
_ = json .Unmarshal ([]byte (byteData ), & fixtures )
0 commit comments