aboutsummaryrefslogtreecommitdiff
path: root/collector/sockstat_linux.go
diff options
context:
space:
mode:
authorTobias Schmidt <tobidt@gmail.com>2017-02-28 13:42:43 -0400
committerTobias Schmidt <tobidt@gmail.com>2017-02-28 13:57:49 -0400
commit694294baf58bfea57e86a0a9ac651727272f774b (patch)
treebac3abb6c309d504de37e34ea4cad7a6e511a75b /collector/sockstat_linux.go
parent21e13c7f52024d3655d43da7585236a5f785269c (diff)
downloadprometheus_node_collector-694294baf58bfea57e86a0a9ac651727272f774b.tar.bz2
prometheus_node_collector-694294baf58bfea57e86a0a9ac651727272f774b.tar.xz
prometheus_node_collector-694294baf58bfea57e86a0a9ac651727272f774b.zip
Remove unnecessary conversions
Diffstat (limited to 'collector/sockstat_linux.go')
-rw-r--r--collector/sockstat_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/collector/sockstat_linux.go b/collector/sockstat_linux.go
index 2e8d489..77873f2 100644
--- a/collector/sockstat_linux.go
+++ b/collector/sockstat_linux.go
@@ -85,7 +85,7 @@ func parseSockStats(r io.Reader, fileName string) (map[string]map[string]string,
85 ) 85 )
86 86
87 for scanner.Scan() { 87 for scanner.Scan() {
88 line := strings.Split(string(scanner.Text()), " ") 88 line := strings.Split(scanner.Text(), " ")
89 // Remove trailing ':'. 89 // Remove trailing ':'.
90 protocol := line[0][:len(line[0])-1] 90 protocol := line[0][:len(line[0])-1]
91 sockStat[protocol] = map[string]string{} 91 sockStat[protocol] = map[string]string{}