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