From 5ca9b267fb995a309d4bf247b10a038cbbdb15ac Mon Sep 17 00:00:00 2001 From: Daniel Rocha Date: Thu, 28 Apr 2022 19:15:51 +0200 Subject: [PATCH] refactor: print hostname before syncing --- cmd/htp/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/htp/main.go b/cmd/htp/main.go index ad9cd70..8d26c10 100644 --- a/cmd/htp/main.go +++ b/cmd/htp/main.go @@ -47,6 +47,9 @@ func buildRootCommand() *cobra.Command { }, } + if !silent { + fmt.Fprintf(os.Stderr, "Syncing with %s ...\n", host) + } if err := htp.Sync(client, model, trace); err != nil { return err } @@ -67,7 +70,7 @@ func buildRootCommand() *cobra.Command { }, } - cmd.Flags().IntVarP(&count, "num-requests", "n", 10, "Number of requests") + cmd.Flags().IntVarP(&count, "num-requests", "n", 8, "Number of requests") cmd.Flags().IntVarP(&timeout, "timeout", "t", 10, "Timeout in seconds") cmd.Flags().BoolVarP(&silent, "silent", "s", false, "Do not show offsets") cmd.Flags().BoolVarP(&date, "date", "d", false, "Show date and time instead of offset")