From 56782e7b2348404597d4606421e9be3b437ed136 Mon Sep 17 00:00:00 2001 From: Jozef Reisinger Date: Sat, 20 Nov 2021 09:25:00 +0100 Subject: [PATCH] minor changes in cli/cli.go --- cli/cli.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/cli.go b/cli/cli.go index 3ad1879..5057889 100755 --- a/cli/cli.go +++ b/cli/cli.go @@ -13,6 +13,7 @@ import ( "github.com/jreisinger/checkip/check" ) +// Run runs checks concurrently against the ippaddr. func Run(checks []check.Check, ipaddr net.IP) (Results, []error) { var results Results var errors []error @@ -25,7 +26,6 @@ func Run(checks []check.Check, ipaddr net.IP) (Results, []error) { r, err := c(ipaddr) if err != nil { errors = append(errors, err) - // log.Printf("check failed: %v", err) return } results = append(results, r) @@ -37,6 +37,7 @@ func Run(checks []check.Check, ipaddr net.IP) (Results, []error) { type Results []check.Result +// PrintJSON prints all results in JSON. func (rs Results) PrintJSON() { if len(rs) == 0 { return @@ -58,7 +59,7 @@ func (rs Results) SortByName() { }) } -// PrintInfo prints results from Info and InfoSec checkers. +// PrintInfo prints summary results from Info and InfoSec checkers. func (rs Results) PrintInfo() { for _, r := range rs { if r.Type == check.TypeInfo || r.Type == check.TypeInfoSec {