From 7e87346b58c918954869af5487f75df6f9d3b3a4 Mon Sep 17 00:00:00 2001 From: Sebastian Nowicki Date: Tue, 24 Jul 2018 12:43:55 +0200 Subject: [PATCH] Remove dev dependency from Gopkg.toml --- Gopkg.lock | 11 ++++++++--- Gopkg.toml | 4 ---- client_test.go | 14 ++++++++++++-- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index fa7cd3a..6aed721 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -10,11 +10,16 @@ branch = "master" name = "github.com/opentracing-contrib/go-stdlib" packages = ["nethttp"] - revision = "48e4d763b2fbcd10e666e6a1742acdf8cc2286ef" + revision = "07a764486eb10927e8cf38337918a40d430524ee" [[projects]] name = "github.com/opentracing/opentracing-go" - packages = [".","ext","log","mocktracer"] + packages = [ + ".", + "ext", + "log", + "mocktracer" + ] revision = "1949ddbfd147afd4d964a9f00b24eb291e0e7c38" version = "v1.0.2" @@ -28,7 +33,7 @@ branch = "master" name = "golang.org/x/net" packages = ["context"] - revision = "5f8847ae0d0e90b6a9dc8148e7ad616874625171" + revision = "a680a1efc54dd51c040b3b5ce4939ea3cf2ea0d1" [solve-meta] analyzer-name = "dep" diff --git a/Gopkg.toml b/Gopkg.toml index ba24223..d3770fc 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -5,7 +5,3 @@ [[constraint]] name = "github.com/opentracing/opentracing-go" version = "1.0.2" - -[[constraint]] - name = "github.com/sebnow/httpclient" - version = "1.0.0" diff --git a/client_test.go b/client_test.go index 49566d2..7cdbc6a 100644 --- a/client_test.go +++ b/client_test.go @@ -1,17 +1,27 @@ package httptracing import ( + "io" "net/http" "net/http/httptest" + "net/url" "testing" "github.com/opentracing/opentracing-go/mocktracer" - "github.com/sebnow/httpclient" ) +// Client is an interface for the http.Client implementation +type Client interface { + Do(req *http.Request) (*http.Response, error) + Get(url string) (resp *http.Response, err error) + Head(url string) (resp *http.Response, err error) + Post(url string, contentType string, body io.Reader) (resp *http.Response, err error) + PostForm(url string, data url.Values) (resp *http.Response, err error) +} + func TestTracingClientImplementInterface(t *testing.T) { var client interface{} = &TracingClient{} - if _, ok := client.(httpclient.Client); !ok { + if _, ok := client.(Client); !ok { t.Errorf("TracingClient does not implement the Client interface") } }