From 450d5294b5d39aab65437af44bdf1faf46fdc9f8 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Mon, 30 Jul 2018 15:59:49 -0400 Subject: [PATCH] Stop using . import --- client/api.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/client/api.go b/client/api.go index ff07ceb84f..5ecb59649f 100644 --- a/client/api.go +++ b/client/api.go @@ -2,7 +2,7 @@ package client import ( - . "github.com/stripe/stripe-go" + stripe "github.com/stripe/stripe-go" "github.com/stripe/stripe-go/account" "github.com/stripe/stripe-go/applepaydomain" "github.com/stripe/stripe-go/balance" @@ -155,9 +155,12 @@ type API struct { // Init initializes the Stripe client with the appropriate secret key // as well as providing the ability to override the backend as needed. -func (a *API) Init(key string, backends *Backends) { +func (a *API) Init(key string, backends *stripe.Backends) { if backends == nil { - backends = &Backends{API: GetBackend(APIBackend), Uploads: GetBackend(UploadsBackend)} + backends = &stripe.Backends{ + API: stripe.GetBackend(stripe.APIBackend), + Uploads: stripe.GetBackend(stripe.UploadsBackend), + } } a.Account = &account.Client{B: backends.API, Key: key} @@ -212,7 +215,7 @@ func (a *API) Init(key string, backends *Backends) { // New creates a new Stripe client with the appropriate secret key // as well as providing the ability to override the backends as needed. -func New(key string, backends *Backends) *API { +func New(key string, backends *stripe.Backends) *API { api := API{} api.Init(key, backends) return &api