@@ -994,7 +994,7 @@ func (c *immuClient) CurrentState(ctx context.Context) (*schema.ImmutableState,
994
994
}
995
995
996
996
start := time .Now ()
997
- defer c .Logger .Debugf ("Current state finished in %s" , time .Since (start ))
997
+ defer func () { c .Logger .Debugf ("Current state finished in %s" , time .Since (start )) }( )
998
998
999
999
return c .ServiceClient .CurrentState (ctx , & empty.Empty {})
1000
1000
}
@@ -1006,7 +1006,7 @@ func (c *immuClient) Get(ctx context.Context, key []byte, opts ...GetOption) (*s
1006
1006
}
1007
1007
1008
1008
start := time .Now ()
1009
- defer c .Logger .Debugf ("get finished in %s" , time .Since (start ))
1009
+ defer func () { c .Logger .Debugf ("get finished in %s" , time .Since (start )) }( )
1010
1010
1011
1011
req := & schema.KeyRequest {Key : key }
1012
1012
for _ , opt := range opts {
@@ -1040,7 +1040,7 @@ func (c *immuClient) GetAtRevision(ctx context.Context, key []byte, rev int64) (
1040
1040
// Gets reads a single value for given key with additional server-provided proof validation.
1041
1041
func (c * immuClient ) VerifiedGet (ctx context.Context , key []byte , opts ... GetOption ) (vi * schema.Entry , err error ) {
1042
1042
start := time .Now ()
1043
- defer c .Logger .Debugf ("VerifiedGet finished in %s" , time .Since (start ))
1043
+ defer func () { c .Logger .Debugf ("VerifiedGet finished in %s" , time .Since (start )) }( )
1044
1044
1045
1045
req := & schema.KeyRequest {Key : key }
1046
1046
for _ , opt := range opts {
@@ -1307,7 +1307,7 @@ func (c *immuClient) VerifiedSet(ctx context.Context, key []byte, value []byte)
1307
1307
}
1308
1308
1309
1309
start := time .Now ()
1310
- defer c .Logger .Debugf ("VerifiedSet finished in %s" , time .Since (start ))
1310
+ defer func () { c .Logger .Debugf ("VerifiedSet finished in %s" , time .Since (start )) }( )
1311
1311
1312
1312
state , err := c .StateService .GetState (ctx , c .Options .CurrentDatabase )
1313
1313
if err != nil {
@@ -1467,7 +1467,7 @@ func (c *immuClient) GetAll(ctx context.Context, keys [][]byte) (*schema.Entries
1467
1467
}
1468
1468
1469
1469
start := time .Now ()
1470
- defer c .Logger .Debugf ("get-batch finished in %s" , time .Since (start ))
1470
+ defer func () { c .Logger .Debugf ("get-batch finished in %s" , time .Since (start )) }( )
1471
1471
1472
1472
keyList := & schema.KeyListRequest {}
1473
1473
@@ -1495,12 +1495,11 @@ func (c *immuClient) TxByID(ctx context.Context, tx uint64) (*schema.Tx, error)
1495
1495
}
1496
1496
1497
1497
start := time .Now ()
1498
- defer c .Logger .Debugf ("by-index finished in %s" , time .Since (start ))
1498
+ defer func () { c .Logger .Debugf ("by-index finished in %s" , time .Since (start )) }( )
1499
1499
1500
1500
t , err := c .ServiceClient .TxById (ctx , & schema.TxRequest {
1501
1501
Tx : tx ,
1502
1502
})
1503
-
1504
1503
if err != nil {
1505
1504
return nil , err
1506
1505
}
@@ -1533,7 +1532,7 @@ func (c *immuClient) VerifiedTxByID(ctx context.Context, tx uint64) (*schema.Tx,
1533
1532
}
1534
1533
1535
1534
start := time .Now ()
1536
- defer c .Logger .Debugf ("VerifiedTxByID finished in %s" , time .Since (start ))
1535
+ defer func () { c .Logger .Debugf ("VerifiedTxByID finished in %s" , time .Since (start )) }( )
1537
1536
1538
1537
state , err := c .StateService .GetState (ctx , c .Options .CurrentDatabase )
1539
1538
if err != nil {
@@ -1619,7 +1618,7 @@ func (c *immuClient) History(ctx context.Context, req *schema.HistoryRequest) (s
1619
1618
}
1620
1619
1621
1620
start := time .Now ()
1622
- defer c .Logger .Debugf ("history finished in %s" , time .Since (start ))
1621
+ defer func () { c .Logger .Debugf ("history finished in %s" , time .Since (start )) }( )
1623
1622
1624
1623
return c .ServiceClient .History (ctx , req )
1625
1624
}
@@ -1640,7 +1639,7 @@ func (c *immuClient) SetReferenceAt(ctx context.Context, key []byte, referencedK
1640
1639
}
1641
1640
1642
1641
start := time .Now ()
1643
- defer c .Logger .Debugf ("SetReference finished in %s" , time .Since (start ))
1642
+ defer func () { c .Logger .Debugf ("SetReference finished in %s" , time .Since (start )) }( )
1644
1643
1645
1644
txhdr , err := c .ServiceClient .SetReference (ctx , & schema.ReferenceRequest {
1646
1645
Key : key ,
@@ -1683,7 +1682,7 @@ func (c *immuClient) VerifiedSetReferenceAt(ctx context.Context, key []byte, ref
1683
1682
}
1684
1683
1685
1684
start := time .Now ()
1686
- defer c .Logger .Debugf ("safereference finished in %s" , time .Since (start ))
1685
+ defer func () { c .Logger .Debugf ("safereference finished in %s" , time .Since (start )) }( )
1687
1686
1688
1687
state , err := c .StateService .GetState (ctx , c .Options .CurrentDatabase )
1689
1688
if err != nil {
@@ -1798,7 +1797,7 @@ func (c *immuClient) ZAddAt(ctx context.Context, set []byte, score float64, key
1798
1797
}
1799
1798
1800
1799
start := time .Now ()
1801
- defer c .Logger .Debugf ("zadd finished in %s" , time .Since (start ))
1800
+ defer func () { c .Logger .Debugf ("zadd finished in %s" , time .Since (start )) }( )
1802
1801
1803
1802
hdr , err := c .ServiceClient .ZAdd (ctx , & schema.ZAddRequest {
1804
1803
Set : set ,
@@ -1848,7 +1847,7 @@ func (c *immuClient) VerifiedZAddAt(ctx context.Context, set []byte, score float
1848
1847
}
1849
1848
1850
1849
start := time .Now ()
1851
- defer c .Logger .Debugf ("safezadd finished in %s" , time .Since (start ))
1850
+ defer func () { c .Logger .Debugf ("safezadd finished in %s" , time .Since (start )) }( )
1852
1851
1853
1852
state , err := c .StateService .GetState (ctx , c .Options .CurrentDatabase )
1854
1853
if err != nil {
0 commit comments