(label string, port int64, source portSource, offset int)
| 1299 | } |
| 1300 | |
| 1301 | func portBannerLine(label string, port int64, source portSource, offset int) string { |
| 1302 | portValue := strconv.FormatInt(port, 10) |
| 1303 | if port == 0 { |
| 1304 | portValue = "disabled" |
| 1305 | } |
| 1306 | if source == "" { |
| 1307 | return fmt.Sprintf("%s: %s", label, portValue) |
| 1308 | } |
| 1309 | return fmt.Sprintf("%s: %s (%s)", label, portValue, portSourceLabel(source, offset)) |
| 1310 | } |
| 1311 | |
| 1312 | func portSourceLabel(source portSource, offset int) string { |
| 1313 | switch source { |