From 6f17231e44466cf2059e0705628c9e5a95bbb8fd Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Thu, 10 Sep 2015 12:21:25 +0200 Subject: [PATCH] Minor comment cleanups. --- collector/sockstat_linux.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/collector/sockstat_linux.go b/collector/sockstat_linux.go index 0d471f8d..d9f1944f 100644 --- a/collector/sockstat_linux.go +++ b/collector/sockstat_linux.go @@ -84,7 +84,7 @@ func parseSockStats(r io.Reader, fileName string) (map[string]map[string]string, for scanner.Scan() { line := strings.Split(string(scanner.Text()), " ") - // Remove trailing :. + // Remove trailing ':'. protocol := line[0][:len(line[0])-1] sockStat[protocol] = map[string]string{} @@ -94,13 +94,10 @@ func parseSockStats(r io.Reader, fileName string) (map[string]map[string]string, } } - /* - The mem metrics is the count of pages used. - Multiply the mem metrics by the page size from the kernal to get the number - of bytes used. - - Update the TCP mem from page count to bytes. - */ + // The mem metrics is the count of pages used. Multiply the mem metrics by + // the page size from the kernel to get the number of bytes used. + // + // Update the TCP mem from page count to bytes. pageCount, err := strconv.Atoi(sockStat["TCP"]["mem"]) if err != nil { return nil, fmt.Errorf("invalid value %s in sockstats: %s", sockStat["TCP"]["mem"], err)