stylistic changes
This commit is contained in:
parent
e01a3bed40
commit
06383d1a2e
@ -2,8 +2,9 @@ package metadata
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"github.com/anacrolix/torrent/bencode"
|
||||
"testing"
|
||||
|
||||
"github.com/anacrolix/torrent/bencode"
|
||||
)
|
||||
|
||||
var operationsTest_instances = []struct {
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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())
|
||||
}
|
||||
|
@ -8,4 +8,4 @@ import (
|
||||
|
||||
func HexField(key string, val []byte) zapcore.Field {
|
||||
return zapcore.Field{Key: key, Type: zapcore.StringType, String: hex.EncodeToString(val)}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user