Closed ghost closed 4 years ago
$ stonks AMD panic: interface conversion: interface {} is int, not graph.ChartTheme
goroutine 1 [running]: main.main.func1(0xc0000eeb00, 0xc0000ad530, 0x1, 0x1) /home/jc/Documents/finance/stonks/main.go:106 +0x1606 github.com/spf13/cobra.(Command).execute(0xc0000eeb00, 0xc0000ba030, 0x1, 0x1, 0xc0000eeb00, 0xc0000ba030) /home/jc/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846 +0x29d github.com/spf13/cobra.(Command).ExecuteC(0xc0000eeb00, 0xc0000c4bc8, 0x910edb, 0x7) /home/jc/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x349 github.com/spf13/cobra.(*Command).Execute(...) /home/jc/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887 main.main() /home/jc/Documents/finance/stonks/main.go:192 +0x605
OS: linux mint 19.2 Stonks was installed using go version go1.14.3 linux/amd64
Steps to reproduce: $ stonks -s AMD $ stonks
Thanks. I'll fix that asap.
This should do for main.go:106.
chartTheme := graph.ChartTheme(viper.GetInt("config.default_theme"))
$ stonks AMD panic: interface conversion: interface {} is int, not graph.ChartTheme
goroutine 1 [running]: main.main.func1(0xc0000eeb00, 0xc0000ad530, 0x1, 0x1) /home/jc/Documents/finance/stonks/main.go:106 +0x1606 github.com/spf13/cobra.(Command).execute(0xc0000eeb00, 0xc0000ba030, 0x1, 0x1, 0xc0000eeb00, 0xc0000ba030) /home/jc/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846 +0x29d github.com/spf13/cobra.(Command).ExecuteC(0xc0000eeb00, 0xc0000c4bc8, 0x910edb, 0x7) /home/jc/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x349 github.com/spf13/cobra.(*Command).Execute(...) /home/jc/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887 main.main() /home/jc/Documents/finance/stonks/main.go:192 +0x605
OS: linux mint 19.2 Stonks was installed using go version go1.14.3 linux/amd64
Steps to reproduce: $ stonks -s AMD $ stonks