func (rt *RoundTripper) RoundTrip(r *http.Request) (*http.Response, error) {
	rt.lock.RLock()
	defer rt.lock.RUnlock()
	if rt.RoundTripper == nil {
		return nil, errNotInitialized
	}
	resp, err := rt.RoundTripper.RoundTrip(r)
	if resp != nil {
		rt.logger.Printf("%s %s %d", r.Method, r.URL, resp.StatusCode)
	}
	return resp, err
}
RoundTrip implements http.RoundTripper
package gmeter
import (
	"crypto/tls"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"log"
	"net/http"
	"net/http/httputil"
	"sync"
	"github.com/seborama/govcr"
)
var (
	errNotInitialized = errors.New("gmeter is not initialized, please call /gmeter/record or /gmeter/play first")
)
type (
	RoundTripper struct {
		http.RoundTripper
		lock    sync.RWMutex
		logger  *log.Logger
		options Options
	}
	request struct {
		Cassette string `json:"cassette"`
	}
	nopTripper struct{}
)
func (nt nopTripper) RoundTrip(r *http.Request) (*http.Response, error) {
	b, err := httputil.DumpRequest(r, true)
	if err != nil {
		return nil, fmt.Errorf("failed to dump request: %v", err)
	}
	return nil, fmt.Errorf("track not found for request: %s", string(b))
}
func NewRoundTripper(options Options, logger *log.Logger) *RoundTripper {
	return &RoundTripper{options: options, logger: logger}
}