From ec5e9b42a9fa16a8b2e09854065be53463f10a1b Mon Sep 17 00:00:00 2001 From: Wondertan Date: Sun, 9 Jan 2022 18:41:10 +0200 Subject: [PATCH] chore: go fmt and return timecache named import --- midgen.go | 4 ++-- pubsub.go | 4 ++-- tag_tracer.go | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/midgen.go b/midgen.go index d09c87d6..4d4aec71 100644 --- a/midgen.go +++ b/midgen.go @@ -9,11 +9,11 @@ import ( type msgIDGenerator struct { Default MsgIdFunction - topicGens map[string]MsgIdFunction + topicGens map[string]MsgIdFunction topicGensLk sync.RWMutex } -func newMsgIdGenerator() *msgIDGenerator{ +func newMsgIdGenerator() *msgIDGenerator { return &msgIDGenerator{ Default: DefaultMsgIdFn, topicGens: make(map[string]MsgIdFunction), diff --git a/pubsub.go b/pubsub.go index e817be44..0a72f134 100644 --- a/pubsub.go +++ b/pubsub.go @@ -20,7 +20,7 @@ import ( "github.com/libp2p/go-libp2p-core/protocol" logging "github.com/ipfs/go-log" - "github.com/whyrusleeping/timecache" + timecache "github.com/whyrusleeping/timecache" ) // DefaultMaximumMessageSize is 1mb. @@ -213,7 +213,7 @@ const ( type Message struct { *pb.Message - ID string + ID string ReceivedFrom peer.ID ValidatorData interface{} } diff --git a/tag_tracer.go b/tag_tracer.go index ae7318d8..333edf84 100644 --- a/tag_tracer.go +++ b/tag_tracer.go @@ -44,9 +44,9 @@ var ( type tagTracer struct { sync.RWMutex - cmgr connmgr.ConnManager - idGen *msgIDGenerator - decayer connmgr.Decayer + cmgr connmgr.ConnManager + idGen *msgIDGenerator + decayer connmgr.Decayer decaying map[string]connmgr.DecayingTag direct map[peer.ID]struct{}