should use time.Since instead of time.Now().Sub
This commit is contained in:

committed by
Guoliang Wang

parent
a5c3c8d16c
commit
89669283fe
@@ -399,7 +399,7 @@ func (l *SSHTunnelList) Dial(net, addr string) (net.Conn, error) {
|
||||
id := mathrand.Int63() // So you can match begins/ends in the log.
|
||||
glog.Infof("[%x: %v] Dialing...", id, addr)
|
||||
defer func() {
|
||||
glog.Infof("[%x: %v] Dialed in %v.", id, addr, time.Now().Sub(start))
|
||||
glog.Infof("[%x: %v] Dialed in %v.", id, addr, time.Since(start))
|
||||
}()
|
||||
tunnel, err := l.pickTunnel(strings.Split(addr, ":")[0])
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user