Skip to content

Commit ed0708a

Browse files
committed
Fmt style check
1 parent f29d9ca commit ed0708a

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

conn.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@ package p2pd
33
import (
44
"context"
55
"fmt"
6-
"io"
7-
"net"
8-
"time"
96
"github.com/libp2p/go-libp2p/core/network"
107
"github.com/libp2p/go-libp2p/core/peer"
118
"github.com/libp2p/go-libp2p/core/protocol"
12-
9+
"io"
10+
"net"
11+
"time"
1312

1413
"github.com/learning-at-home/go-libp2p-daemon/internal/utils"
1514
pb "github.com/learning-at-home/go-libp2p-daemon/pb"
1615

17-
1816
ggio "github.com/gogo/protobuf/io"
1917
ma "github.com/multiformats/go-multiaddr"
2018
)
@@ -124,7 +122,7 @@ func (d *Daemon) handleConn(c net.Conn) {
124122
log.Debugw("error writing response", "error", err)
125123
return
126124
}
127-
125+
128126
case pb.Request_BANDWIDTH_METRICS:
129127
res := d.doBandwidthMetrics(&req)
130128
err := w.WriteMsg(res)
@@ -351,8 +349,8 @@ func (d *Daemon) doBandwidthMetrics(req *pb.Request) *pb.Response {
351349
selfRateOut = stats.RateOut
352350
}
353351
res := okResponse()
354-
res.Bwr = &pb.BandwidthMetricsResponse {
355-
SelfRateIn: &selfRateIn,
352+
res.Bwr = &pb.BandwidthMetricsResponse{
353+
SelfRateIn: &selfRateIn,
356354
SelfRateOut: &selfRateOut,
357355
}
358356

@@ -391,7 +389,7 @@ func (d *Daemon) doBandwidthMetrics(req *pb.Request) *pb.Response {
391389
}
392390
res.Bwr.Peers = peers
393391
}
394-
392+
395393
return res
396394
}
397395

connmgr.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66

77
"github.com/libp2p/go-libp2p/core/peer"
88

9-
109
pb "github.com/learning-at-home/go-libp2p-daemon/pb"
1110
)
1211

daemon.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"github.com/learning-at-home/go-libp2p-daemon/config"
1212
"github.com/learning-at-home/go-libp2p-daemon/internal/utils"
1313

14-
1514
"github.com/libp2p/go-libp2p"
1615
"github.com/libp2p/go-libp2p/core/host"
1716
"github.com/libp2p/go-libp2p/core/metrics"
@@ -112,7 +111,7 @@ func NewDaemon(
112111
} else {
113112
d.bandwidth_metrics = nil
114113
}
115-
114+
116115
h, err := libp2p.New(opts...)
117116
if err != nil {
118117
return nil, err

0 commit comments

Comments
 (0)