stylistic changes

This commit is contained in:
Bora M. Alper 2018-12-30 08:25:03 +03:00
parent e01a3bed40
commit 06383d1a2e
No known key found for this signature in database
GPG Key ID: 8F1A9504E1BD114D
5 changed files with 8 additions and 7 deletions

View File

@ -2,8 +2,9 @@ package metadata
import (
"bytes"
"github.com/anacrolix/torrent/bencode"
"testing"
"github.com/anacrolix/torrent/bencode"
)
var operationsTest_instances = []struct {

View File

@ -8,13 +8,15 @@ package mainline
import (
"encoding/binary"
"fmt"
"github.com/pkg/errors"
"net"
"github.com/pkg/errors"
"regexp"
"github.com/anacrolix/missinggo/iter"
"github.com/anacrolix/torrent/bencode"
"github.com/willf/bloom"
"regexp"
)
type Message struct {

View File

@ -48,7 +48,7 @@ func apiTorrentsHandler(w http.ResponseWriter, r *http.Request) {
return
}
if tq.LastID != nil && *tq.LastID < 0 {
if tq.LastID == nil {
respondError(w, 400, "lastID has to be greater than or equal to zero")
return
}

View File

@ -1,7 +1,6 @@
package main
import (
"fmt"
"testing"
)
@ -113,5 +112,4 @@ func TestSchemaRequired(t *testing.T) {
if err == nil {
t.Error("err is nil")
}
fmt.Printf(err.Error())
}