tracker: Fix some comments

This commit is contained in:
Matt Joiner 2018-11-28 12:02:25 +11:00
parent 3e3f2e4128
commit 2789a4ff39
2 changed files with 3 additions and 5 deletions

View File

@ -58,15 +58,13 @@ type Announce struct {
ServerName string ServerName string
UserAgent string UserAgent string
UdpNetwork string UdpNetwork string
// If the port is zero, it's assumed to be the same as the Request.Port // If the port is zero, it's assumed to be the same as the Request.Port.
ClientIp4 krpc.NodeAddr ClientIp4 krpc.NodeAddr
// If the port is zero, it's assumed to be the same as the Request.Port // If the port is zero, it's assumed to be the same as the Request.Port.
ClientIp6 krpc.NodeAddr ClientIp6 krpc.NodeAddr
Context context.Context Context context.Context
} }
// In an FP language with currying, what order what you put these params?
func (me Announce) Do() (res AnnounceResponse, err error) { func (me Announce) Do() (res AnnounceResponse, err error) {
_url, err := url.Parse(me.TrackerUrl) _url, err := url.Parse(me.TrackerUrl)
if err != nil { if err != nil {

View File

@ -152,7 +152,7 @@ func TestAnnounceRandomInfoHashThirdParty(t *testing.T) {
t.Parallel() t.Parallel()
if testing.Short() { if testing.Short() {
// This test involves contacting third party servers that may have // This test involves contacting third party servers that may have
// unpreditable results. // unpredictable results.
t.SkipNow() t.SkipNow()
} }
req := AnnounceRequest{ req := AnnounceRequest{