(s *bufio.Scanner)
| 79 | } |
| 80 | |
| 81 | func parseNetProtocols(s *bufio.Scanner) (NetProtocolStats, error) { |
| 82 | nps := NetProtocolStats{} |
| 83 | |
| 84 | // Skip the header line |
| 85 | s.Scan() |
| 86 | |
| 87 | for s.Scan() { |
| 88 | line, err := nps.parseLine(s.Text()) |
| 89 | if err != nil { |
| 90 | return NetProtocolStats{}, err |
| 91 | } |
| 92 | |
| 93 | nps[line.Name] = *line |
| 94 | } |
| 95 | return nps, nil |
| 96 | } |
| 97 | |
| 98 | func (ps NetProtocolStats) parseLine(rawLine string) (*NetProtocolStatLine, error) { |
| 99 | line := &NetProtocolStatLine{Capabilities: NetProtocolCapabilities{}} |
no test coverage detected
searching dependent graphs…