如何将stripe-go指向stripe-mock本地服务器?

I am using stripe-go to perform Stripe actions such as create a new customer, add a credit card, create a subscription and so on. I want to perform end-to-end testing. There is stripe-mock which is a mock HTTP server that responds like the real Stripe API. I have that running locally in a terminal. How do I point my stripe-go which I am using in my Go application to make calls to this mock HTTP server instead of the real Stripe API.

In the stripe-go documentation there is this

// Setup
stripe.Key = "sk_key"

stripe.SetBackend("api", backend) // optional, useful for mocking

Am I supposed to pass something special as backend so that stripe-go knows to then make calls to http://localhost:12111 which is the address of stripe-mock?

This is stripe.SetBackend

// SetBackend sets the backend used in the binding.
func SetBackend(backend SupportedBackend, b Backend) {
    switch backend {
    case APIBackend:
        backends.API = b
    case UploadsBackend:
        backends.Uploads = b
    }
}

This is Backend

// Backend is an interface for making calls against a Stripe service.
// This interface exists to enable mocking for during testing if needed.
type Backend interface {
    Call(method, path, key string, body *RequestValues, params *Params, v interface{}) error
    CallMultipart(method, path, key, boundary string, body io.Reader, params *Params, v interface{}) error
}

Looking in stripe.go, the publicly exposed BackendConfiguration struct implements the Backend interface. So the following should work:

httpClient := &http.Client{Timeout: defaultHTTPTimeout}

mockBackend := &stripe.BackendConfiguration{
      "api", 
      "http://localhost:12111", 
      httpClient,
}

stripe.SetBackend("api", mockBackend)