forked from TrueCloudLab/frostfs-node
[#1689] linter: Fix staticcheck warning: 'embedded field can be simplified'
Change-Id: I8f454f7d09973cdea096495c3949b88cdd01102e Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
923f0acf8f
commit
6f7b6b65f3
34 changed files with 121 additions and 121 deletions
|
@ -48,7 +48,7 @@ func (c *clientCache) init(pk *ecdsa.PrivateKey, ds *internalNet.DialerSource) {
|
|||
|
||||
func (c *clientCache) get(ctx context.Context, netmapAddr string) (TreeServiceClient, error) {
|
||||
c.Lock()
|
||||
ccInt, ok := c.LRU.Get(netmapAddr)
|
||||
ccInt, ok := c.Get(netmapAddr)
|
||||
c.Unlock()
|
||||
|
||||
if ok {
|
||||
|
@ -71,9 +71,9 @@ func (c *clientCache) get(ctx context.Context, netmapAddr string) (TreeServiceCl
|
|||
|
||||
c.Lock()
|
||||
if err != nil {
|
||||
c.LRU.Add(netmapAddr, cacheItem{cc: nil, lastTry: lastTry})
|
||||
c.Add(netmapAddr, cacheItem{cc: nil, lastTry: lastTry})
|
||||
} else {
|
||||
c.LRU.Add(netmapAddr, cacheItem{cc: cc, lastTry: lastTry})
|
||||
c.Add(netmapAddr, cacheItem{cc: cc, lastTry: lastTry})
|
||||
}
|
||||
c.Unlock()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue