Skip to content

Commit 198e27f

Browse files
committed
chore: run gofmt
1 parent 335c75a commit 198e27f

File tree

5 files changed

+34
-34
lines changed

5 files changed

+34
-34
lines changed

core/connmgr/null.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func (NullConnMgr) TagPeer(peer.ID, string, int) {}
1616
func (NullConnMgr) UntagPeer(peer.ID, string) {}
1717
func (NullConnMgr) UpsertTag(peer.ID, string, func(int) int) {}
1818
func (NullConnMgr) GetTagInfo(peer.ID) *TagInfo { return &TagInfo{} }
19-
func (NullConnMgr) TrimOpenConns(_ context.Context) {}
19+
func (NullConnMgr) TrimOpenConns(_ context.Context) {}
2020
func (NullConnMgr) Notifee() network.Notifiee { return network.GlobalNoopNotifiee }
2121
func (NullConnMgr) Protect(peer.ID, string) {}
2222
func (NullConnMgr) Unprotect(peer.ID, string) bool { return false }

core/network/notifee.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type NoopNotifiee struct{}
6161

6262
var _ Notifiee = (*NoopNotifiee)(nil)
6363

64-
func (nn *NoopNotifiee) Connected(_ Network, _ Conn) {}
65-
func (nn *NoopNotifiee) Disconnected(_ Network, _ Conn) {}
64+
func (nn *NoopNotifiee) Connected(_ Network, _ Conn) {}
65+
func (nn *NoopNotifiee) Disconnected(_ Network, _ Conn) {}
6666
func (nn *NoopNotifiee) Listen(_ Network, _ ma.Multiaddr) {}
6767
func (nn *NoopNotifiee) ListenClose(_ Network, _ ma.Multiaddr) {}

core/network/rcmgr.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -343,18 +343,18 @@ func (n *NullResourceManager) Close() error {
343343
return nil
344344
}
345345

346-
func (n *NullScope) ReserveMemory(_ int, _ uint8) error { return nil }
346+
func (n *NullScope) ReserveMemory(_ int, _ uint8) error { return nil }
347347
func (n *NullScope) ReleaseMemory(_ int) {}
348-
func (n *NullScope) Stat() ScopeStat { return ScopeStat{} }
349-
func (n *NullScope) BeginSpan() (ResourceScopeSpan, error) { return &NullScope{}, nil }
350-
func (n *NullScope) Done() {}
351-
func (n *NullScope) Name() string { return "" }
352-
func (n *NullScope) Protocol() protocol.ID { return "" }
353-
func (n *NullScope) Peer() peer.ID { return "" }
354-
func (n *NullScope) PeerScope() PeerScope { return &NullScope{} }
355-
func (n *NullScope) SetPeer(peer.ID) error { return nil }
356-
func (n *NullScope) ProtocolScope() ProtocolScope { return &NullScope{} }
357-
func (n *NullScope) SetProtocol(_ protocol.ID) error { return nil }
358-
func (n *NullScope) ServiceScope() ServiceScope { return &NullScope{} }
359-
func (n *NullScope) SetService(_ string) error { return nil }
360-
func (n *NullScope) VerifySourceAddress(_ net.Addr) bool { return false }
348+
func (n *NullScope) Stat() ScopeStat { return ScopeStat{} }
349+
func (n *NullScope) BeginSpan() (ResourceScopeSpan, error) { return &NullScope{}, nil }
350+
func (n *NullScope) Done() {}
351+
func (n *NullScope) Name() string { return "" }
352+
func (n *NullScope) Protocol() protocol.ID { return "" }
353+
func (n *NullScope) Peer() peer.ID { return "" }
354+
func (n *NullScope) PeerScope() PeerScope { return &NullScope{} }
355+
func (n *NullScope) SetPeer(peer.ID) error { return nil }
356+
func (n *NullScope) ProtocolScope() ProtocolScope { return &NullScope{} }
357+
func (n *NullScope) SetProtocol(_ protocol.ID) error { return nil }
358+
func (n *NullScope) ServiceScope() ServiceScope { return &NullScope{} }
359+
func (n *NullScope) SetService(_ string) error { return nil }
360+
func (n *NullScope) VerifySourceAddress(_ net.Addr) bool { return false }

p2p/host/basic/natmgr.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ func (nmgr *natManager) GetMapping(addr ma.Multiaddr) ma.Multiaddr {
292292

293293
type nmgrNetNotifiee natManager
294294

295-
func (nn *nmgrNetNotifiee) natManager() *natManager { return (*natManager)(nn) }
296-
func (nn *nmgrNetNotifiee) Listen(network.Network, ma.Multiaddr) { nn.natManager().sync() }
295+
func (nn *nmgrNetNotifiee) natManager() *natManager { return (*natManager)(nn) }
296+
func (nn *nmgrNetNotifiee) Listen(network.Network, ma.Multiaddr) { nn.natManager().sync() }
297297
func (nn *nmgrNetNotifiee) ListenClose(_ network.Network, _ ma.Multiaddr) { nn.natManager().sync() }
298-
func (nn *nmgrNetNotifiee) Connected(network.Network, network.Conn) {}
299-
func (nn *nmgrNetNotifiee) Disconnected(network.Network, network.Conn) {}
298+
func (nn *nmgrNetNotifiee) Connected(network.Network, network.Conn) {}
299+
func (nn *nmgrNetNotifiee) Disconnected(network.Network, network.Conn) {}

p2p/net/connmgr/connmgr_test.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -804,20 +804,20 @@ type mockConn struct {
804804
stats network.ConnStats
805805
}
806806

807-
func (m mockConn) Close() error { panic("implement me") }
808-
func (m mockConn) CloseWithError(_ network.ConnErrorCode) error { panic("implement me") }
809-
func (m mockConn) LocalPeer() peer.ID { panic("implement me") }
810-
func (m mockConn) RemotePeer() peer.ID { panic("implement me") }
811-
func (m mockConn) RemotePublicKey() crypto.PubKey { panic("implement me") }
812-
func (m mockConn) LocalMultiaddr() ma.Multiaddr { panic("implement me") }
813-
func (m mockConn) RemoteMultiaddr() ma.Multiaddr { panic("implement me") }
814-
func (m mockConn) Stat() network.ConnStats { return m.stats }
815-
func (m mockConn) ID() string { panic("implement me") }
816-
func (m mockConn) IsClosed() bool { panic("implement me") }
807+
func (m mockConn) Close() error { panic("implement me") }
808+
func (m mockConn) CloseWithError(_ network.ConnErrorCode) error { panic("implement me") }
809+
func (m mockConn) LocalPeer() peer.ID { panic("implement me") }
810+
func (m mockConn) RemotePeer() peer.ID { panic("implement me") }
811+
func (m mockConn) RemotePublicKey() crypto.PubKey { panic("implement me") }
812+
func (m mockConn) LocalMultiaddr() ma.Multiaddr { panic("implement me") }
813+
func (m mockConn) RemoteMultiaddr() ma.Multiaddr { panic("implement me") }
814+
func (m mockConn) Stat() network.ConnStats { return m.stats }
815+
func (m mockConn) ID() string { panic("implement me") }
816+
func (m mockConn) IsClosed() bool { panic("implement me") }
817817
func (m mockConn) NewStream(_ context.Context) (network.Stream, error) { panic("implement me") }
818-
func (m mockConn) GetStreams() []network.Stream { panic("implement me") }
819-
func (m mockConn) Scope() network.ConnScope { panic("implement me") }
820-
func (m mockConn) ConnState() network.ConnectionState { return network.ConnectionState{} }
818+
func (m mockConn) GetStreams() []network.Stream { panic("implement me") }
819+
func (m mockConn) Scope() network.ConnScope { panic("implement me") }
820+
func (m mockConn) ConnState() network.ConnectionState { return network.ConnectionState{} }
821821

822822
func makeSegmentsWithPeerInfos(peerInfos peerInfos) *segments {
823823
var s = func() *segments {

0 commit comments

Comments
 (0)