Remove unnecessary conversions
This commit is contained in:
parent
21e13c7f52
commit
694294baf5
9 changed files with 13 additions and 14 deletions
|
|
@ -93,9 +93,9 @@ func parseNetStats(r io.Reader, fileName string) (map[string]map[string]string,
|
|||
)
|
||||
|
||||
for scanner.Scan() {
|
||||
nameParts := strings.Split(string(scanner.Text()), " ")
|
||||
nameParts := strings.Split(scanner.Text(), " ")
|
||||
scanner.Scan()
|
||||
valueParts := strings.Split(string(scanner.Text()), " ")
|
||||
valueParts := strings.Split(scanner.Text(), " ")
|
||||
// Remove trailing :.
|
||||
protocol := nameParts[0][:len(nameParts[0])-1]
|
||||
netStats[protocol] = map[string]string{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue