Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
stylistic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
boramalper committed Dec 30, 2018
1 parent e01a3be commit 06383d1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion cmd/magneticod/bittorrent/metadata/leech_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package metadata

import (
"bytes"
"github.com/anacrolix/torrent/bencode"
"testing"

"github.com/anacrolix/torrent/bencode"
)

var operationsTest_instances = []struct {
Expand Down
6 changes: 4 additions & 2 deletions cmd/magneticod/dht/mainline/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/magneticow/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 0 additions & 2 deletions cmd/magneticow/main_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"fmt"
"testing"
)

Expand Down Expand Up @@ -113,5 +112,4 @@ func TestSchemaRequired(t *testing.T) {
if err == nil {
t.Error("err is nil")
}
fmt.Printf(err.Error())
}
2 changes: 1 addition & 1 deletion pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
}
}

0 comments on commit 06383d1

Please sign in to comment.