Skip to content

Commit

Permalink
Give more info when missing parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
leifcr committed Feb 6, 2019
1 parent 5a40a25 commit f063cce
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func main() {
"timeframe values: M1, M5, M15, M30, H1, H4, D1, W1, MN (Comma separated list)")
flag.StringVar(&args.Symbol,
"symbol", "",
"symbol list using format, like: EURUSD EURGBP")
"symbol list using format, like: EURUSD EURGBP (*required)")
flag.StringVar(&args.Start,
"start", start,
"start date format YYYY-MM-DD")
Expand All @@ -83,7 +83,7 @@ func main() {
"one of the model values: 0, 1, 2")
flag.StringVar(&args.Format,
"format", "",
"output file format, supported csv/hst/fxt")
"output file format, supported csv/hst/fxt (*required)")
flag.BoolVar(&args.Header,
"header", false,
"save csv with header")
Expand Down Expand Up @@ -118,7 +118,11 @@ func main() {

opt, err := ParseOption(args)
if err != nil {
fmt.Println(err)
fmt.Println("--------------------------------------------")
fmt.Printf("Error: %s\n", err)
fmt.Println("--------------------------------------------\n")
fmt.Println("Usage:")
flag.PrintDefaults()
return
}

Expand Down

0 comments on commit f063cce

Please sign in to comment.