Remove unused roundtripper code
This commit is contained in:
parent
8ab77fc3d7
commit
bcff71167c
@ -3,7 +3,6 @@ package client
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/broker"
|
||||||
@ -18,10 +17,6 @@ import (
|
|||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
type headerRoundTripper struct {
|
|
||||||
r http.RoundTripper
|
|
||||||
}
|
|
||||||
|
|
||||||
type rpcClient struct {
|
type rpcClient struct {
|
||||||
once sync.Once
|
once sync.Once
|
||||||
opts options
|
opts options
|
||||||
@ -56,11 +51,6 @@ func newRpcClient(opt ...Option) Client {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *headerRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) {
|
|
||||||
r.Header.Set("X-Client-Version", "1.0")
|
|
||||||
return t.r.RoundTrip(r)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *rpcClient) codecFunc(contentType string) (codecFunc, error) {
|
func (r *rpcClient) codecFunc(contentType string) (codecFunc, error) {
|
||||||
if cf, ok := r.opts.codecs[contentType]; ok {
|
if cf, ok := r.opts.codecs[contentType]; ok {
|
||||||
return codecWrap(cf), nil
|
return codecWrap(cf), nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user