Created
December 27, 2018 23:37
-
-
Save Adron/03ce2e36533af12862e6b9119467df88 to your computer and use it in GitHub Desktop.
The main code for the config functionality file for twitz.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var configCmd = &cobra.Command{ | |
Use: "config", | |
Short: "A brief description of your command", | |
Long: `A longer description that spans multiple lines and likely contains examples | |
and usage of using your command. For the custom example: | |
Cobra is a CLI library for Go that empowers applications. | |
This application is a tool to generate the needed files | |
to quickly create a Cobra application.`, | |
Run: func(cmd *cobra.Command, args []string) { | |
fmt.Printf("Twitterers File: %s\n", viper.GetString("file")) | |
fmt.Printf("Export File: %s\n", viper.GetString("fileExport")) | |
fmt.Printf("Export Format: %s\n", viper.GetString("fileFormat")) | |
fmt.Printf("Consumer API Key: %s\n", viper.GetString("consumer_api_key")[0:6]) | |
fmt.Printf("Consumer API Secret: %s\n", viper.GetString("consumer_api_secret")[0:6]) | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment