Closed druzn3k closed 3 weeks ago
@druzn3k: maybe adding a debug
method to immuClient to wrap the call could simplify the code
@druzn3k: maybe adding a
debug
method to immuClient to wrap the call could simplify the code
Why not :) I'm thinking about something in this ballpark:
func (c *immuClient) debugWithTimeElapsed(msg string, start time.Time)
The name is on the ugly side though, but I can't come up with something better on the spot. Suggestions?
maybe:
func (c *immuClient) debugElapsedTime(method string, start *time.Time)
You could just pass the method name
done @ostafen . Let me know if you like this version better.
@druzn3k: looks good to me, thanks!
This commit fixes the complaining from
go vet
about the deferring oftime.Since
. This can cause wrong time evaluation of the elapsed time. This impact only the debug level, but still it should be addressed.ref: https://github.com/golang/go/issues/60048
Signed-off-by: Maurizio Del Corno druznek@gmail.com