From 1ea9beb802a13edfc5f8a3d381f56c72acba45cf Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 5 Feb 2016 15:42:23 +1100 Subject: [PATCH] tracker: Rename the http client type to httpClient --- tracker/http.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tracker/http.go b/tracker/http.go index 15916ee9..3a733462 100644 --- a/tracker/http.go +++ b/tracker/http.go @@ -18,12 +18,12 @@ func init() { RegisterClientScheme("http", NewClient) } -type client struct { +type httpClient struct { url url.URL } func NewClient(url *url.URL) Client { - return &client{ + return &httpClient{ url: *url, } } @@ -54,7 +54,7 @@ func (r *response) UnmarshalPeers() (ret []Peer, err error) { return } -func (me *client) Announce(ar *AnnounceRequest) (ret AnnounceResponse, err error) { +func (me *httpClient) Announce(ar *AnnounceRequest) (ret AnnounceResponse, err error) { q := make(url.Values) q.Set("info_hash", string(ar.InfoHash[:])) q.Set("peer_id", string(ar.PeerId[:])) @@ -99,15 +99,15 @@ func (me *client) Announce(ar *AnnounceRequest) (ret AnnounceResponse, err error return } -func (me *client) Connect() error { +func (me *httpClient) Connect() error { // HTTP trackers do not require a connecting handshake. return nil } -func (me *client) String() string { +func (me *httpClient) String() string { return me.URL() } -func (me *client) URL() string { +func (me *httpClient) URL() string { return me.url.String() } -- 2.48.1