Skip to content

Commit 277790a

Browse files
committed
Rename flags to be more specific.
1 parent 7aeaf92 commit 277790a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cmd/ponzi2/ponzi2.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ import (
99
)
1010

1111
var (
12-
token = flag.String("token", "", "IEX API token required on requests.")
13-
enableChartCache = flag.Bool("enable_chart_cache", true, "Whether to enable the chart cache.")
14-
dumpAPIResponses = flag.Bool("dump_api_responses", false, "Dump API responses to txt files.")
12+
iexAPIToken = flag.String("iex_api_token", "", "IEX API Token required on requests.")
13+
enableIEXChartCache = flag.Bool("enable_iex_chart_cache", true, "Whether to enable the IEX chart cache.")
14+
dumpIEXAPIResponses = flag.Bool("dump_iex_api_responses", false, "Dump API responses to txt files.")
1515
)
1616

1717
func main() {
1818
flag.Parse()
1919

2020
switch {
21-
case *enableChartCache:
21+
case *enableIEXChartCache:
2222
cache, err := iex.OpenGOBChartCache()
2323
if err != nil {
2424
logger.Fatal(err)
2525
}
26-
c := iex.NewClient(cache, *dumpAPIResponses)
27-
a := app.New(c, *token)
26+
c := iex.NewClient(cache, *dumpIEXAPIResponses)
27+
a := app.New(c, *iexAPIToken)
2828
logger.Fatal(a.Run())
2929

3030
default:
31-
c := iex.NewClient(new(iex.NoOpChartCache), *dumpAPIResponses)
32-
a := app.New(c, *token)
31+
c := iex.NewClient(new(iex.NoOpChartCache), *dumpIEXAPIResponses)
32+
a := app.New(c, *iexAPIToken)
3333
logger.Fatal(a.Run())
3434
}
3535
}

0 commit comments

Comments
 (0)