Add basic documentation
This commit is contained in:
parent
0124558f70
commit
0e7a823c72
|
@ -11,13 +11,8 @@ import (
|
||||||
// generateCmd represents the generate command
|
// generateCmd represents the generate command
|
||||||
var generatecaCmd = &cobra.Command{
|
var generatecaCmd = &cobra.Command{
|
||||||
Use: "generate-ca",
|
Use: "generate-ca",
|
||||||
Short: "A brief description of your command",
|
Short: "Generate CA certificates for the webserver to use",
|
||||||
Long: `A longer description that spans multiple lines and likely contains examples
|
Long: `Generate CA certificates for the webserver to use`,
|
||||||
and usage of using your command. For 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) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
generateCA()
|
generateCA()
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,13 +16,8 @@ var cfgFile string
|
||||||
|
|
||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "cert400",
|
Use: "cert400",
|
||||||
Short: "A brief description of your application",
|
Short: "CA Web-Server capable of generating signed certificates",
|
||||||
Long: `A longer description that spans multiple lines and likely contains
|
Long: `CA Web-Server capable of generating signed certificates`,
|
||||||
examples and usage of using your application. For 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.`,
|
|
||||||
// Uncomment the following line if your bare application
|
// Uncomment the following line if your bare application
|
||||||
// has an action associated with it:
|
// has an action associated with it:
|
||||||
// Run: func(cmd *cobra.Command, args []string) { },
|
// Run: func(cmd *cobra.Command, args []string) { },
|
||||||
|
|
|
@ -19,9 +19,7 @@ var serverCmd = &cobra.Command{
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(serverCmd)
|
rootCmd.AddCommand(serverCmd)
|
||||||
serverCmd.Flags().StringP("cert", "c", "$HOME/.config/cert400/server.crt", "CA certificate")
|
// TODO: Allow choosing CA certificates by parameter
|
||||||
serverCmd.Flags().StringP("key", "k", "$HOME/.config/cert400/server.key", "CA private key")
|
// serverCmd.Flags().StringP("cert", "c", "$HOME/.config/cert400/server.crt", "CA certificate")
|
||||||
}
|
// serverCmd.Flags().StringP("key", "k", "$HOME/.config/cert400/server.key", "CA private key")
|
||||||
func setServerParams(cmd *cobra.Command) error {
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue