diff --git a/README.md b/README.md index 7535f45..937fb13 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ If you want to build for yourself: output format (stdout|csv|json) (default "stdout") -search searches all urls with same base domain (i.e. example.com and sub.example.com) (default true) + -silent + avoid printing header (default false) -update update apps file -worker int diff --git a/cmd/webanalyze/main.go b/cmd/webanalyze/main.go index b01eb4a..559513c 100644 --- a/cmd/webanalyze/main.go +++ b/cmd/webanalyze/main.go @@ -25,6 +25,7 @@ var ( hosts string crawlCount int searchSubdomain bool + silent bool ) func init() { @@ -36,6 +37,7 @@ func init() { flag.StringVar(&hosts, "hosts", "", "filename with hosts, one host per line.") flag.IntVar(&crawlCount, "crawl", 0, "links to follow from the root page (default 0)") flag.BoolVar(&searchSubdomain, "search", true, "searches all urls with same base domain (i.e. example.com and sub.example.com)") + flag.BoolVar(&silent, "silent", false, "avoid printing header (default false)") } func main() { @@ -95,7 +97,9 @@ func main() { log.Fatalf("initialization failed: %v", err) } - printHeader() + if !silent { + printHeader() + } for i := 0; i < workers; i++ { wg.Add(1)