From 3e59553772eccb483946234bdd6e56dd30d41f47 Mon Sep 17 00:00:00 2001 From: josh <josh@elixxir.io> Date: Thu, 9 Sep 2021 14:52:28 -0700 Subject: [PATCH] Fix formatting --- network/gateway/sender.go | 4 ++-- storage/session.go | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/network/gateway/sender.go b/network/gateway/sender.go index d689a91da..ddd41478c 100644 --- a/network/gateway/sender.go +++ b/network/gateway/sender.go @@ -102,8 +102,8 @@ func (s *Sender) SendToPreferred(targets []*id.ID, for targetIdx := range proxies { target := targets[targetIdx] targetProxies := proxies[targetIdx] - if !(int(proxyIdx)<len(targetProxies)){ - jww.WARN.Printf("Failed to send to proxy %d on target %d (%s) " + + if !(int(proxyIdx) < len(targetProxies)) { + jww.WARN.Printf("Failed to send to proxy %d on target %d (%s) "+ "due to not enough proxies (only %d), skipping attempt", proxyIdx, targetIdx, target, len(targetProxies)) continue diff --git a/storage/session.go b/storage/session.go index f8d543d4a..fd98a85c2 100644 --- a/storage/session.go +++ b/storage/session.go @@ -46,9 +46,9 @@ const currentSessionVersion = 0 // Session object, backed by encrypted filestore type Session struct { - kv *versioned.KV + kv *versioned.KV - mux sync.RWMutex + mux sync.RWMutex //memoized data regStatus RegistrationStatus @@ -79,9 +79,8 @@ func initStore(baseDir, password string) (*Session, error) { "Failed to create storage session") } - s = &Session{ - kv: versioned.NewKV(fs), + kv: versioned.NewKV(fs), } return s, nil -- GitLab