Skip to content

Commit

Permalink
added color to flag helper function to indicate required flags
Browse files Browse the repository at this point in the history
  • Loading branch information
eze-kiel committed Apr 20, 2021
1 parent 01caaad commit 150980c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/slowql-digest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ var orders = []string{"random", "calls", "bytes_sent", "query_time", "lock_time"

func main() {
var o options
flag.StringVar(&o.logfile, "f", "", "Slow query log file to digest")
flag.StringVar(&o.logfile, "f", "", "Slow query log file to digest "+Red("(required)").String())
flag.StringVar(&o.loglevel, "l", "info", "Log level")
flag.StringVar(&o.kind, "k", "", "Database kind")
flag.StringVar(&o.kind, "k", "", "Database kind "+Red("(required)").String())
flag.IntVar(&o.top, "top", 3, "Top queries to show")
flag.StringVar(&o.order, "sort-by", "random", "How to sort queries. use ? to see all the available values")
flag.BoolVar(&o.dec, "dec", false, "Sort by decreasing order")
Expand Down

0 comments on commit 150980c

Please sign in to comment.