From 0609b02f82321577ba80cd368c6085fd0442f3f7 Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Wed, 22 Jun 2022 15:10:07 -0400 Subject: [Cleanup] Make long lines shorter and fix static fmt warnings Besides running golines (for the first time in a while now that the tool supports generics), this commit removes punctuation and newlines from Errorf parameters -- something that gofmt does not like (I never knew!). --- extendedstats/unix.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'extendedstats/unix.go') diff --git a/extendedstats/unix.go b/extendedstats/unix.go index 1448368..a2d4d30 100644 --- a/extendedstats/unix.go +++ b/extendedstats/unix.go @@ -30,14 +30,18 @@ func ExtendedStatsAvailable() bool { func (es *ExtendedStats) IncorporateConnectionStats(rawConn net.Conn) error { tlsConn, ok := rawConn.(*tls.Conn) if !ok { - return fmt.Errorf("OOPS: Could not get the TCP info for the connection (not a TLS connection)!\n") + return fmt.Errorf( + "OOPS: Could not get the TCP info for the connection (not a TLS connection)", + ) } tcpConn, ok := tlsConn.NetConn().(*net.TCPConn) if !ok { - return fmt.Errorf("OOPS: Could not get the TCP info for the connection (not a TCP connection)!\n") + return fmt.Errorf( + "OOPS: Could not get the TCP info for the connection (not a TCP connection)", + ) } if info, err := getTCPInfo(tcpConn); err != nil { - return fmt.Errorf("OOPS: Could not get the TCP info for the connection: %v!\n", err) + return fmt.Errorf("OOPS: Could not get the TCP info for the connection: %v", err) } else { es.MaxPathMtu = utilities.Max(es.MaxPathMtu, uint64(info.Pmtu)) es.MaxRecvMss = utilities.Max(es.MaxRecvMss, uint64(info.Rcv_mss)) -- cgit v1.2.3