Closed troyengel closed 3 years ago
Are you still experiencing this issue?
Hi, ... yes? We're still on the same version as when reported (1.0.8) -- would this be fixed by recompiling, is it a bug in one of the Go dependencies pulled down during build? Use a little trial and error:
1) 1m
and 2m
cause a crash as per above
2) Any range I tried not listed in this code returns "no chart for this time period": https://github.com/piquette/finance-go/blob/master/datetime/datetime.go
$ stonks -i 45m AAPL
No bars were found for this time period for AAPL
I suspect the out of range is due to that, as it is slurped in, passed to GetChart() to make the object and the object passed to GenerateChart() assuming that the interval is correct. So it would seem that perhaps it's because finance-go/datetime has problems handling anything other than what's listed in their code, and maybe 1m/2m are broken? (not a programmer :) )
It appears specifying
-i 1m
or-i 2m
falls outside an internal code/index range, but once you get to-i 3m
it starts to work correctly (graceful failure for no data available). I usepikaur
as my AUR helper, that's what the name of that directory in the build path output is from seen below.1m
2m
3m
My stonks was compiled about a week or so ago, no edits to the PKGBUILD made.