summaryrefslogtreecommitdiff
path: root/extendedstats/unix.go
diff options
context:
space:
mode:
authorWill Hawkins <[email protected]>2022-06-22 15:10:07 -0400
committerWill Hawkins <[email protected]>2022-06-22 15:10:07 -0400
commit0609b02f82321577ba80cd368c6085fd0442f3f7 (patch)
tree782f966243f9d2dbcd328837a2cdf9ce5c1f948b /extendedstats/unix.go
parent8595ff279dc46e3f974661e29686af3de5e01026 (diff)
[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!).
Diffstat (limited to 'extendedstats/unix.go')
-rw-r--r--extendedstats/unix.go10
1 files changed, 7 insertions, 3 deletions
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))