airshipctl/cmd/secret/secret.go
Alexander Hughes c2a0359ff9 [#91] refactor secrets as top level command
Future use of secrets will be clunky if it remains as a document
subcommand ex: airshipctl document secret generate materpassphrase

Refactoring so that secrets are now a top level command IE
airshipctl secret ...

Change-Id: I781ef5a4e32dc971f275f758d82d17cedd0f74af
Signed-off-by: Alexander Hughes <Alexander.Hughes@pm.me>
2020-03-13 13:00:53 +00:00

21 lines
434 B
Go

package secret
import (
"github.com/spf13/cobra"
"opendev.org/airship/airshipctl/cmd/secret/generate"
)
// NewSecretCommand creates a new command for managing airshipctl secrets
func NewSecretCommand() *cobra.Command {
secretRootCmd := &cobra.Command{
Use: "secret",
// TODO(howell): Make this more expressive
Short: "manages secrets",
}
secretRootCmd.AddCommand(generate.NewGenerateCommand())
return secretRootCmd
}