Last active
April 15, 2019 04:57
-
-
Save sle-c/afcde3ed6d5094cb0f9659566f30ba0b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package cmd | |
import ( | |
"fmt" | |
"os" | |
"github.com/spf13/cobra" | |
) | |
var rootCmd = &cobra.Command{ | |
Use: "goliauth", | |
Short: "A mini CLI to generate random key and public/secret key pairs for API", | |
} | |
// Execute chains all the commands together under the root command which is goliauth | |
// Usage: `goliauth [command]` | |
func Execute() { | |
rootCmd.AddCommand( | |
keyCmd(), | |
appCmd(), | |
) | |
if err := rootCmd.Execute(); err != nil { | |
fmt.Println(err) | |
os.Exit(1) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment