|
|
|
@ -16,6 +16,7 @@ func Execute() {
|
|
|
|
|
var refreshRate uint
|
|
|
|
|
var config, cmcAPIKey, apiChoice, colorscheme, coin, currency string
|
|
|
|
|
cacheDir := filecache.DefaultCacheDir
|
|
|
|
|
perPage := cointop.DefaultPerPage
|
|
|
|
|
|
|
|
|
|
rootCmd := &cobra.Command{
|
|
|
|
|
Use: "cointop",
|
|
|
|
@ -78,6 +79,7 @@ For more information, visit: https://github.com/miguelmota/cointop`,
|
|
|
|
|
HideStatusbar: hideStatusbar,
|
|
|
|
|
OnlyTable: onlyTable,
|
|
|
|
|
RefreshRate: refreshRateP,
|
|
|
|
|
PerPage: perPage,
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
@ -98,6 +100,7 @@ For more information, visit: https://github.com/miguelmota/cointop`,
|
|
|
|
|
rootCmd.Flags().BoolVarP(&silent, "silent", "s", false, "Silence log ouput")
|
|
|
|
|
rootCmd.Flags().BoolVarP(&noCache, "no-cache", "", false, "No cache")
|
|
|
|
|
rootCmd.Flags().UintVarP(&refreshRate, "refresh-rate", "r", 60, "Refresh rate in seconds. Set to 0 to not auto-refresh")
|
|
|
|
|
rootCmd.Flags().UintVarP(&perPage, "per-page", "", perPage, "Per page")
|
|
|
|
|
rootCmd.Flags().StringVarP(&config, "config", "c", "", fmt.Sprintf("Config filepath. (default %s)", cointop.DefaultConfigFilepath))
|
|
|
|
|
rootCmd.Flags().StringVarP(&cmcAPIKey, "coinmarketcap-api-key", "", "", "Set the CoinMarketCap API key")
|
|
|
|
|
rootCmd.Flags().StringVarP(&apiChoice, "api", "", cointop.CoinGecko, "API choice. Available choices are \"coinmarketcap\" and \"coingecko\"")
|
|
|
|
|