Skip to content

Commit

Permalink
Move to add/remove commands, remove presenters
Browse files Browse the repository at this point in the history
  • Loading branch information
codepope committed Jul 23, 2020
1 parent e0fd326 commit 2c237c4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 91 deletions.
10 changes: 6 additions & 4 deletions cmd/certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ func newCertificatesCommand() *Command {
certsListStrings := docstrings.Get("certs.list")
BuildCommand(cmd, runCertsList, certsListStrings.Usage, certsListStrings.Short, certsListStrings.Long, os.Stdout, requireSession, requireAppName)

certsCreateStrings := docstrings.Get("certs.create")
create := BuildCommand(cmd, runCertAdd, certsCreateStrings.Usage, certsCreateStrings.Short, certsCreateStrings.Long, os.Stdout, requireSession, requireAppName)
create.Command.Args = cobra.ExactArgs(1)
certsCreateStrings := docstrings.Get("certs.add")
createCmd := BuildCommand(cmd, runCertAdd, certsCreateStrings.Usage, certsCreateStrings.Short, certsCreateStrings.Long, os.Stdout, requireSession, requireAppName)
createCmd.Aliases = []string{"create"}
createCmd.Command.Args = cobra.ExactArgs(1)

certsDeleteStrings := docstrings.Get("certs.delete")
certsDeleteStrings := docstrings.Get("certs.remove")
deleteCmd := BuildCommand(cmd, runCertDelete, certsDeleteStrings.Usage, certsDeleteStrings.Short, certsDeleteStrings.Long, os.Stdout, requireSession, requireAppName)
deleteCmd.Aliases = []string{"delete"}
deleteCmd.Command.Args = cobra.ExactArgs(1)
deleteCmd.AddBoolFlag(BoolFlagOpts{Name: "yes", Shorthand: "y", Description: "accept all confirmations"})

Expand Down
46 changes: 0 additions & 46 deletions cmd/presenters/certificate.go

This file was deleted.

31 changes: 0 additions & 31 deletions cmd/presenters/certificates.go

This file was deleted.

20 changes: 10 additions & 10 deletions helpgen/flyctlhelp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -216,22 +216,22 @@ usage="list"
shortHelp="List certificates for an App."
longHelp="""List the certificates associated with a deployed application.
"""
[certs.create]
usage="create <hostname>"
shortHelp="Create a certificate for an App."
longHelp="""Creates a certificate for an application. Takes a hostname
[certs.add]
usage="add <hostname>"
shortHelp="Add a certificate for an App."
longHelp="""Add a certificate for an application. Takes a hostname
as a parameter for the certificate.
"""
[certs.delete]
usage="delete <hostname>"
shortHelp="Delete certificate"
longHelp="""Deletes a certificate from an application. Takes hostname
[certs.remove]
usage="remove <hostname>"
shortHelp="Removes a certificate from an App"
longHelp="""Removes a certificate from an application. Takes hostname
as a parameter to locate the certificate.
"""
[certs.show]
usage="show <hostname>"
shortHelp="Shows detailed certificate information"
longHelp="""Shows detailed certificate information for an application.
shortHelp="Shows certificate information"
longHelp="""Shows certificate information for an application.
Takes hostname as a parameter to locate the certificate.
"""
[certs.check]
Expand Down

0 comments on commit 2c237c4

Please sign in to comment.