Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1 from sebnow/remove-httpclient-dependency
Browse files Browse the repository at this point in the history
Remove dev dependency from Gopkg.toml
  • Loading branch information
sebnow committed Jul 24, 2018
2 parents c221109 + 7e87346 commit 4d0e638
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
11 changes: 8 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
14 changes: 12 additions & 2 deletions client_test.go
Original file line number Diff line number Diff line change
@@ -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")
}
}
Expand Down

0 comments on commit 4d0e638

Please sign in to comment.