Skip to content

Commit

Permalink
refactor: print hostname before syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
danroc committed Apr 28, 2022
1 parent 45fe328 commit 5ca9b26
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/htp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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")
Expand Down

0 comments on commit 5ca9b26

Please # to comment.