Skip to content

Instantly share code, notes, and snippets.

@sle-c
Last active April 15, 2019 04:57
Show Gist options
  • Save sle-c/afcde3ed6d5094cb0f9659566f30ba0b to your computer and use it in GitHub Desktop.
Save sle-c/afcde3ed6d5094cb0f9659566f30ba0b to your computer and use it in GitHub Desktop.
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