From 0f8e1050757f8c62aacc6c87dd59599dfcae96f2 Mon Sep 17 00:00:00 2001 From: Justin Hammond <39606064+Justintime50@users.noreply.github.com> Date: Thu, 10 Feb 2022 13:05:00 -0700 Subject: [PATCH] fix: module namespace by appending v2 (#52) * fix: module namespace by appending v2 * chore: bump version --- CHANGELOG.md | 6 ++++++ README.md | 4 ++-- examples/addresses/create/create_address.go | 3 ++- examples/addresses/retrieve/retrieve_address.go | 3 ++- examples/addresses/retrieve_all/retrieve_addresses.go | 3 ++- examples/batches/create/create_batch.go | 3 ++- examples/batches/retrieve/retrieve_batch.go | 3 ++- examples/batches/retrieve_all/retrieve_batches.go | 3 ++- examples/batches/scan_form_batch/scan_form_batch.go | 3 ++- examples/events/retrieve_all/retrieve_events.go | 2 +- examples/parcels/create/create_parcel.go | 3 ++- examples/parcels/retrieve/retrieve_parcel.go | 3 ++- examples/rates/retrieve_rate.go | 3 ++- examples/scanforms/create/create_scanform.go | 3 ++- examples/scanforms/retrieve/retrieve_scanform.go | 3 ++- examples/scanforms/retrieve_all/retrieve_scanforms.go | 3 ++- examples/shipments/buy/buy_shipment.go | 3 ++- examples/shipments/create/create_shipment.go | 3 ++- examples/shipments/lowest_rate/lowest_rate.go | 2 +- examples/shipments/rerate/rerate_shipment.go | 2 +- examples/shipments/retrieve/retrieve_shipment.go | 3 ++- examples/shipments/retrieve_all/retrieve_shipments.go | 3 ++- examples/trackers/create/create_tracker.go | 3 ++- examples/trackers/retrieve/retrieve_tracker.go | 3 ++- examples/trackers/retrieve_all/retrieve_trackers.go | 3 ++- examples/users/update_brand.go | 2 +- examples/webhooks/handler/webhook_handler.go | 2 +- go.mod | 2 +- tests/address_test.go | 2 +- tests/batch_test.go | 2 +- tests/carrier_type_test.go | 2 +- tests/client_test.go | 2 +- tests/error_test.go | 2 +- tests/event_test.go | 2 +- tests/insurance_test.go | 2 +- tests/order_test.go | 2 +- tests/parcel_test.go | 2 +- tests/pickup_test.go | 2 +- tests/report_test.go | 2 +- tests/scan_form_test.go | 2 +- tests/shipment_test.go | 2 +- tests/tracker_test.go | 2 +- tests/user_test.go | 2 +- tests/util_test.go | 2 +- tests/webhook_test.go | 2 +- version.go | 2 +- 46 files changed, 72 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f4c221..1d6fd73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,13 @@ # CHANGELOG +## v2.0.1 (2022-02-10) + +* Corrects namespace for v2 release from `github.com/EasyPost/easypost-go` to `github.com/EasyPost/easypost-go/v2` + ## v2.0.0 (2022-02-09) +**NOTE: Do not use this release, use v2.0.1 or later due to this release being incorrectly packaged.** + * Bumps minimum Go version from `1.12` to `1.15` * Bumps dependencies * Lints the entire project diff --git a/README.md b/README.md index 0fd629e..d1d4646 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This work is licensed under the ISC License, a copy of which can be found at [LI ## Installation ```bash -go get -u github.com/EasyPost/easypost-go +go get -u github.com/EasyPost/easypost-go/v2 ``` ## Documentation @@ -26,7 +26,7 @@ import ( "fmt" "os" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/addresses/create/create_address.go b/examples/addresses/create/create_address.go index afe0351..f01338b 100644 --- a/examples/addresses/create/create_address.go +++ b/examples/addresses/create/create_address.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/addresses/retrieve/retrieve_address.go b/examples/addresses/retrieve/retrieve_address.go index 1a0acd0..0b6228e 100644 --- a/examples/addresses/retrieve/retrieve_address.go +++ b/examples/addresses/retrieve/retrieve_address.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/addresses/retrieve_all/retrieve_addresses.go b/examples/addresses/retrieve_all/retrieve_addresses.go index b8399c8..3291f9d 100644 --- a/examples/addresses/retrieve_all/retrieve_addresses.go +++ b/examples/addresses/retrieve_all/retrieve_addresses.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/batches/create/create_batch.go b/examples/batches/create/create_batch.go index 818a05d..87b09ee 100644 --- a/examples/batches/create/create_batch.go +++ b/examples/batches/create/create_batch.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/batches/retrieve/retrieve_batch.go b/examples/batches/retrieve/retrieve_batch.go index 0c158e8..4b15fc0 100644 --- a/examples/batches/retrieve/retrieve_batch.go +++ b/examples/batches/retrieve/retrieve_batch.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/batches/retrieve_all/retrieve_batches.go b/examples/batches/retrieve_all/retrieve_batches.go index 17c051a..0f4a5bc 100644 --- a/examples/batches/retrieve_all/retrieve_batches.go +++ b/examples/batches/retrieve_all/retrieve_batches.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/batches/scan_form_batch/scan_form_batch.go b/examples/batches/scan_form_batch/scan_form_batch.go index 4195f8c..05b4fe1 100644 --- a/examples/batches/scan_form_batch/scan_form_batch.go +++ b/examples/batches/scan_form_batch/scan_form_batch.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/events/retrieve_all/retrieve_events.go b/examples/events/retrieve_all/retrieve_events.go index 4cfde82..723cd65 100644 --- a/examples/events/retrieve_all/retrieve_events.go +++ b/examples/events/retrieve_all/retrieve_events.go @@ -6,7 +6,7 @@ import ( "os" "time" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/parcels/create/create_parcel.go b/examples/parcels/create/create_parcel.go index 73ca367..fa56a52 100644 --- a/examples/parcels/create/create_parcel.go +++ b/examples/parcels/create/create_parcel.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/parcels/retrieve/retrieve_parcel.go b/examples/parcels/retrieve/retrieve_parcel.go index b635d59..9687059 100644 --- a/examples/parcels/retrieve/retrieve_parcel.go +++ b/examples/parcels/retrieve/retrieve_parcel.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/rates/retrieve_rate.go b/examples/rates/retrieve_rate.go index 8530f8d..cf31f2a 100644 --- a/examples/rates/retrieve_rate.go +++ b/examples/rates/retrieve_rate.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/scanforms/create/create_scanform.go b/examples/scanforms/create/create_scanform.go index 6501ca1..13e4190 100644 --- a/examples/scanforms/create/create_scanform.go +++ b/examples/scanforms/create/create_scanform.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/scanforms/retrieve/retrieve_scanform.go b/examples/scanforms/retrieve/retrieve_scanform.go index 476ee52..ff79983 100644 --- a/examples/scanforms/retrieve/retrieve_scanform.go +++ b/examples/scanforms/retrieve/retrieve_scanform.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/scanforms/retrieve_all/retrieve_scanforms.go b/examples/scanforms/retrieve_all/retrieve_scanforms.go index 16743d6..bff578f 100644 --- a/examples/scanforms/retrieve_all/retrieve_scanforms.go +++ b/examples/scanforms/retrieve_all/retrieve_scanforms.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/shipments/buy/buy_shipment.go b/examples/shipments/buy/buy_shipment.go index b7be3fe..498ee84 100644 --- a/examples/shipments/buy/buy_shipment.go +++ b/examples/shipments/buy/buy_shipment.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/shipments/create/create_shipment.go b/examples/shipments/create/create_shipment.go index 5acd689..0f958ff 100644 --- a/examples/shipments/create/create_shipment.go +++ b/examples/shipments/create/create_shipment.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/shipments/lowest_rate/lowest_rate.go b/examples/shipments/lowest_rate/lowest_rate.go index fc19d30..1f99ca2 100644 --- a/examples/shipments/lowest_rate/lowest_rate.go +++ b/examples/shipments/lowest_rate/lowest_rate.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/shipments/rerate/rerate_shipment.go b/examples/shipments/rerate/rerate_shipment.go index 69e43e1..b60a847 100644 --- a/examples/shipments/rerate/rerate_shipment.go +++ b/examples/shipments/rerate/rerate_shipment.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/shipments/retrieve/retrieve_shipment.go b/examples/shipments/retrieve/retrieve_shipment.go index a0bffd2..e6dcb53 100644 --- a/examples/shipments/retrieve/retrieve_shipment.go +++ b/examples/shipments/retrieve/retrieve_shipment.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/shipments/retrieve_all/retrieve_shipments.go b/examples/shipments/retrieve_all/retrieve_shipments.go index 7d51e8f..e7301a4 100644 --- a/examples/shipments/retrieve_all/retrieve_shipments.go +++ b/examples/shipments/retrieve_all/retrieve_shipments.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/trackers/create/create_tracker.go b/examples/trackers/create/create_tracker.go index 1690027..6fc2421 100644 --- a/examples/trackers/create/create_tracker.go +++ b/examples/trackers/create/create_tracker.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/trackers/retrieve/retrieve_tracker.go b/examples/trackers/retrieve/retrieve_tracker.go index 07a1a91..7658ff0 100644 --- a/examples/trackers/retrieve/retrieve_tracker.go +++ b/examples/trackers/retrieve/retrieve_tracker.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/trackers/retrieve_all/retrieve_trackers.go b/examples/trackers/retrieve_all/retrieve_trackers.go index d08e915..e464771 100644 --- a/examples/trackers/retrieve_all/retrieve_trackers.go +++ b/examples/trackers/retrieve_all/retrieve_trackers.go @@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" - "github.com/EasyPost/easypost-go" "os" + + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/users/update_brand.go b/examples/users/update_brand.go index 89dfe51..426b5a2 100644 --- a/examples/users/update_brand.go +++ b/examples/users/update_brand.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func main() { diff --git a/examples/webhooks/handler/webhook_handler.go b/examples/webhooks/handler/webhook_handler.go index 3991a0c..a59ebb3 100644 --- a/examples/webhooks/handler/webhook_handler.go +++ b/examples/webhooks/handler/webhook_handler.go @@ -8,7 +8,7 @@ import ( "net/http" "strings" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) type Handler struct { diff --git a/go.mod b/go.mod index ec1c94f..a0eccdf 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/EasyPost/easypost-go +module github.com/EasyPost/easypost-go/v2 go 1.15 diff --git a/tests/address_test.go b/tests/address_test.go index 963a952..1ed5c38 100644 --- a/tests/address_test.go +++ b/tests/address_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func (c *ClientTests) TestAddressCreationVerification() { diff --git a/tests/batch_test.go b/tests/batch_test.go index 8e7b2a9..e7a48b7 100644 --- a/tests/batch_test.go +++ b/tests/batch_test.go @@ -3,7 +3,7 @@ package easypost_test import ( "time" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func (c *ClientTests) TestBatchCreateAndBuy() { diff --git a/tests/carrier_type_test.go b/tests/carrier_type_test.go index 86bd250..cdb4d7e 100644 --- a/tests/carrier_type_test.go +++ b/tests/carrier_type_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func (c *ClientTests) TestCarrierTypes() { diff --git a/tests/client_test.go b/tests/client_test.go index a1114d5..28b6d6b 100644 --- a/tests/client_test.go +++ b/tests/client_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func (c *ClientTests) TestClientTimeout() { diff --git a/tests/error_test.go b/tests/error_test.go index 7255e96..70b8ef5 100644 --- a/tests/error_test.go +++ b/tests/error_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" "github.com/stretchr/testify/assert" ) diff --git a/tests/event_test.go b/tests/event_test.go index 8dd89cc..f6a1b72 100644 --- a/tests/event_test.go +++ b/tests/event_test.go @@ -1,6 +1,6 @@ package easypost_test -import "github.com/EasyPost/easypost-go" +import "github.com/EasyPost/easypost-go/v2" func (c *ClientTests) TestEventsGet() { client := c.TestClient() diff --git a/tests/insurance_test.go b/tests/insurance_test.go index b75fd99..55025e4 100644 --- a/tests/insurance_test.go +++ b/tests/insurance_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func (c *ClientTests) TestInsuranceCreation() { diff --git a/tests/order_test.go b/tests/order_test.go index 9715896..ac30fda 100644 --- a/tests/order_test.go +++ b/tests/order_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func (c *ClientTests) TestOrderCreateThenBuy() { diff --git a/tests/parcel_test.go b/tests/parcel_test.go index a9b564a..5f4fdfc 100644 --- a/tests/parcel_test.go +++ b/tests/parcel_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func (c *ClientTests) TestParcelCreation() { diff --git a/tests/pickup_test.go b/tests/pickup_test.go index 5eb65b2..e0bee96 100644 --- a/tests/pickup_test.go +++ b/tests/pickup_test.go @@ -3,7 +3,7 @@ package easypost_test import ( "time" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func noonOnNextMonday() time.Time { diff --git a/tests/report_test.go b/tests/report_test.go index 19f413e..5c3e809 100644 --- a/tests/report_test.go +++ b/tests/report_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func (c *ClientTests) TestShipmentReport() { diff --git a/tests/scan_form_test.go b/tests/scan_form_test.go index cfe344c..c00d63b 100644 --- a/tests/scan_form_test.go +++ b/tests/scan_form_test.go @@ -3,7 +3,7 @@ package easypost_test import ( "strconv" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func (c *ClientTests) TestScanFormCreateAndRetrieve() { diff --git a/tests/shipment_test.go b/tests/shipment_test.go index 8d574c4..91445d9 100644 --- a/tests/shipment_test.go +++ b/tests/shipment_test.go @@ -4,7 +4,7 @@ import ( "strconv" "strings" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func (c *ClientTests) TestShipmentCreation() { diff --git a/tests/tracker_test.go b/tests/tracker_test.go index 76684cf..e093df7 100644 --- a/tests/tracker_test.go +++ b/tests/tracker_test.go @@ -3,7 +3,7 @@ package easypost_test import ( "strconv" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func (c *ClientTests) TestTrackerValues() { diff --git a/tests/user_test.go b/tests/user_test.go index d874eab..a08fc68 100644 --- a/tests/user_test.go +++ b/tests/user_test.go @@ -3,7 +3,7 @@ package easypost_test import ( "encoding/json" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" "github.com/dnaeon/go-vcr/cassette" ) diff --git a/tests/util_test.go b/tests/util_test.go index 79c6250..b9275d5 100644 --- a/tests/util_test.go +++ b/tests/util_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" "github.com/dnaeon/go-vcr/cassette" "github.com/dnaeon/go-vcr/recorder" "github.com/stretchr/testify/suite" diff --git a/tests/webhook_test.go b/tests/webhook_test.go index 0e676a8..414a798 100644 --- a/tests/webhook_test.go +++ b/tests/webhook_test.go @@ -3,7 +3,7 @@ package easypost_test import ( "net/http" - "github.com/EasyPost/easypost-go" + "github.com/EasyPost/easypost-go/v2" ) func (c *ClientTests) TestWebhooks() { diff --git a/version.go b/version.go index db60c01..2f8a787 100644 --- a/version.go +++ b/version.go @@ -1,3 +1,3 @@ package easypost -const Version = "2.0.0" +const Version = "2.0.1"