stylistic changes
This commit is contained in:
parent
e01a3bed40
commit
06383d1a2e
@ -2,8 +2,9 @@ package metadata
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/anacrolix/torrent/bencode"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/anacrolix/torrent/bencode"
|
||||||
)
|
)
|
||||||
|
|
||||||
var operationsTest_instances = []struct {
|
var operationsTest_instances = []struct {
|
||||||
|
@ -8,13 +8,15 @@ package mainline
|
|||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/pkg/errors"
|
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
|
"regexp"
|
||||||
|
|
||||||
"github.com/anacrolix/missinggo/iter"
|
"github.com/anacrolix/missinggo/iter"
|
||||||
"github.com/anacrolix/torrent/bencode"
|
"github.com/anacrolix/torrent/bencode"
|
||||||
"github.com/willf/bloom"
|
"github.com/willf/bloom"
|
||||||
"regexp"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Message struct {
|
type Message struct {
|
||||||
|
@ -48,7 +48,7 @@ func apiTorrentsHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
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")
|
respondError(w, 400, "lastID has to be greater than or equal to zero")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -113,5 +112,4 @@ func TestSchemaRequired(t *testing.T) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
t.Error("err is nil")
|
t.Error("err is nil")
|
||||||
}
|
}
|
||||||
fmt.Printf(err.Error())
|
|
||||||
}
|
}
|
||||||
|
@ -8,4 +8,4 @@ import (
|
|||||||
|
|
||||||
func HexField(key string, val []byte) zapcore.Field {
|
func HexField(key string, val []byte) zapcore.Field {
|
||||||
return zapcore.Field{Key: key, Type: zapcore.StringType, String: hex.EncodeToString(val)}
|
return zapcore.Field{Key: key, Type: zapcore.StringType, String: hex.EncodeToString(val)}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user