refactor: domainName as arg and doc strings
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
See coop-cloud/organising#163.
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/client"
|
||||
"github.com/sirupsen/logrus"
|
||||
@ -19,13 +17,14 @@ internal bookkeeping so that it is not managed any more.
|
||||
`,
|
||||
HideHelp: true,
|
||||
Action: func(c *cli.Context) error {
|
||||
server := c.Args().First()
|
||||
if server == "" {
|
||||
internal.ShowSubcommandHelpAndError(c, errors.New("no server provided"))
|
||||
}
|
||||
if err := client.DeleteContext(server); err != nil {
|
||||
domainName := internal.ValidateDomain(c)
|
||||
|
||||
if err := client.DeleteContext(domainName); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
logrus.Infof("Server at '%s' has been forgotten", domainName)
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user