diff --git a/cmd/apps/deploy.go b/cmd/apps/deploy.go index 163d015..b22bc27 100644 --- a/cmd/apps/deploy.go +++ b/cmd/apps/deploy.go @@ -18,7 +18,7 @@ import ( ) var deployCmd = &cobra.Command{ - Use: locales.L.Get("app.deploy.cmd"), + Use: "deploy [PATH]", Short: locales.L.Get("app.deploy.description"), RunE: func(cmd *cobra.Command, args []string) error { path, err := filepath.Abs(".") diff --git a/cmd/apps/register.go b/cmd/apps/register.go index 40ec84b..18834f3 100644 --- a/cmd/apps/register.go +++ b/cmd/apps/register.go @@ -15,7 +15,7 @@ import ( ) var registerCmd = &cobra.Command{ - Use: locales.L.Get("app.register.cmd"), + Use: "register [SERVER] [DOMAIN] [PATH]", Short: locales.L.Get("app.register.description"), RunE: func(cmd *cobra.Command, args []string) error { sPath, _ := cmd.Flags().GetString("target-path") diff --git a/cmd/databases/create.go b/cmd/databases/create.go index 4cc77ca..6240df3 100644 --- a/cmd/databases/create.go +++ b/cmd/databases/create.go @@ -14,7 +14,7 @@ import ( ) var createCmd = &cobra.Command{ - Use: locales.L.Get("database.create.cmd"), + Use: "create [SERVER] [DOMAIN] [NAME]", Short: locales.L.Get("database.create.description"), RunE: func(cmd *cobra.Command, args []string) error { var realdbt string = "" diff --git a/cmd/databases/delete.go b/cmd/databases/delete.go index 61a0fdb..6e18e58 100644 --- a/cmd/databases/delete.go +++ b/cmd/databases/delete.go @@ -11,7 +11,7 @@ import ( ) var deleteCmd = &cobra.Command{ - Use: locales.L.Get("database.delete.cmd"), + Use: "delete [SERVER] [NAME]", Short: locales.L.Get("database.delete.description"), RunE: func(cmd *cobra.Command, args []string) error { server, err := config.GetServer(args[0]) diff --git a/cmd/databases/list.go b/cmd/databases/list.go index 4f51f51..d204511 100644 --- a/cmd/databases/list.go +++ b/cmd/databases/list.go @@ -10,7 +10,7 @@ import ( ) var listCmd = &cobra.Command{ - Use: locales.L.Get("database.list.cmd"), + Use: "list [SERVER] [DOMAIN]", Short: locales.L.Get("database.list.description"), RunE: func(cmd *cobra.Command, args []string) error { server, err := config.GetServer(args[0]) diff --git a/cmd/databases/upload.go b/cmd/databases/upload.go index 2e95b10..6cb6012 100644 --- a/cmd/databases/upload.go +++ b/cmd/databases/upload.go @@ -16,7 +16,7 @@ import ( ) var uploadCmd = &cobra.Command{ - Use: locales.L.Get("database.deploy.cmd"), + Use: "upload [SERVER] [DOMAIN] [NAME] [FILE]", Short: locales.L.Get("database.deploy.description"), RunE: func(cmd *cobra.Command, args []string) error { server, err := config.GetServer(args[0]) diff --git a/cmd/domains/create.go b/cmd/domains/create.go index fb8e760..74d25b8 100644 --- a/cmd/domains/create.go +++ b/cmd/domains/create.go @@ -14,7 +14,7 @@ import ( ) var createCmd = &cobra.Command{ - Use: locales.L.Get("domain.create.cmd"), + Use: "create [SERVER] [DOMAIN] [IPv4] [IPv6]", Short: locales.L.Get("domain.create.description"), RunE: func(cmd *cobra.Command, args []string) error { addr4 := []string{} diff --git a/cmd/domains/list.go b/cmd/domains/list.go index 528426c..3c24fd3 100644 --- a/cmd/domains/list.go +++ b/cmd/domains/list.go @@ -10,7 +10,7 @@ import ( ) var listCmd = &cobra.Command{ - Use: locales.L.Get("domain.list.cmd"), + Use: "list [SERVER]", Short: locales.L.Get("domain.list.description"), RunE: func(cmd *cobra.Command, args []string) error { server, err := config.GetServer(args[0]) diff --git a/cmd/domains/reload.go b/cmd/domains/reload.go index ed2fcff..6605ef8 100644 --- a/cmd/domains/reload.go +++ b/cmd/domains/reload.go @@ -11,7 +11,7 @@ import ( ) var reloadCmd = &cobra.Command{ - Use: locales.L.Get("domain.reload.cmd"), + Use: "reload [SERVER]", Short: locales.L.Get("domain.reload.description"), RunE: func(cmd *cobra.Command, args []string) error { server, err := config.GetServer(args[0]) diff --git a/cmd/domains/rm.go b/cmd/domains/rm.go index 4324857..da93a39 100644 --- a/cmd/domains/rm.go +++ b/cmd/domains/rm.go @@ -11,7 +11,7 @@ import ( ) var deleteCmd = &cobra.Command{ - Use: locales.L.Get("domain.delete.cmd"), + Use: "delete [SERVER] [DOMAIN...]", Short: locales.L.Get("domain.delete.description"), RunE: func(cmd *cobra.Command, args []string) error { var lastErr error = nil diff --git a/cmd/servers/delete.go b/cmd/servers/delete.go index 125e6ff..dc7fa15 100644 --- a/cmd/servers/delete.go +++ b/cmd/servers/delete.go @@ -11,7 +11,7 @@ import ( ) var deleteCmd = &cobra.Command{ - Use: locales.L.Get("server.delete.cmd"), + Use: "delete [IP ADDRESS|HOSTNAME ...]", Short: locales.L.Get("server.delete.description"), Run: func(cmd *cobra.Command, args []string) { for _, host := range args { diff --git a/cmd/servers/list.go b/cmd/servers/list.go index f315491..9651090 100644 --- a/cmd/servers/list.go +++ b/cmd/servers/list.go @@ -9,7 +9,7 @@ import ( ) var listCmd = &cobra.Command{ - Use: locales.L.Get("server.list.cmd"), + Use: "list", Short: locales.L.Get("server.list.description"), RunE: func(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true diff --git a/cmd/servers/login.go b/cmd/servers/login.go index ee1bd49..ea14ead 100644 --- a/cmd/servers/login.go +++ b/cmd/servers/login.go @@ -10,7 +10,7 @@ import ( ) var loginCmd = &cobra.Command{ - Use: locales.L.Get("server.login.cmd"), + Use: "login [SERVER]", Short: locales.L.Get("server.login.description"), RunE: func(cmd *cobra.Command, args []string) error { generateOnly, _ := cmd.Flags().GetBool("generate") diff --git a/cmd/servers/reauth.go b/cmd/servers/reauth.go index f4a1bdc..cd2e0fe 100644 --- a/cmd/servers/reauth.go +++ b/cmd/servers/reauth.go @@ -11,7 +11,7 @@ import ( ) var reauthCmd = &cobra.Command{ - Use: locales.L.Get("server.reauth.cmd"), + Use: "reauth [IP ADDRESS|HOSTNAME]", Short: locales.L.Get("server.reauth.description"), RunE: func(cmd *cobra.Command, args []string) error { server, err := config.GetServer(args[0]) diff --git a/cmd/servers/register.go b/cmd/servers/register.go index eafb350..b3e59ea 100644 --- a/cmd/servers/register.go +++ b/cmd/servers/register.go @@ -10,7 +10,7 @@ import ( ) var registerCmd = &cobra.Command{ - Use: locales.L.Get("server.register.cmd"), + Use: "register [IP ADDRESS|HOSTNAME]", Short: locales.L.Get("server.register.description"), RunE: func(cmd *cobra.Command, args []string) error { ignoreSsl, _ := cmd.Flags().GetBool("ignore-ssl") diff --git a/cmd/servers/reload.go b/cmd/servers/reload.go index d1a7ed7..26e87ab 100644 --- a/cmd/servers/reload.go +++ b/cmd/servers/reload.go @@ -11,7 +11,7 @@ import ( ) var reloadCmd = &cobra.Command{ - Use: locales.L.Get("server.reload.cmd"), + Use: "reload [IP ADDRESS|HOSTNAME]", Short: locales.L.Get("server.reload.description"), RunE: func(cmd *cobra.Command, args []string) error { server, err := config.GetServer(args[0]) diff --git a/cmd/sync/sync.go b/cmd/sync/sync.go index 3879f6b..050a611 100644 --- a/cmd/sync/sync.go +++ b/cmd/sync/sync.go @@ -14,7 +14,7 @@ import ( ) var SyncCmd = &cobra.Command{ - Use: locales.L.Get("files.upload.cmd"), + Use: "sync [SERVER] [DOMAIN] [FILE ...]", Short: locales.L.Get("files.upload.description"), RunE: func(cmd *cobra.Command, args []string) error { var lastErr error = nil diff --git a/locales/locales.go b/locales/locales.go index 2f61f63..5fc780e 100644 --- a/locales/locales.go +++ b/locales/locales.go @@ -40,10 +40,8 @@ func init() { defs = map[string]map[string]string{ "en_US": { "app.description": "Manage local applications", - "app.deploy.cmd": "deploy [PATH]", "app.deploy.description": "Deploy application in set PATH to DOMAIN on SERVER", "app.deploy.success": "Application in %s successfully deployed", - "app.register.cmd": "register [SERVER] [DOMAIN] [PATH]", "app.register.description": "Register a new appliation in the specified path", "app.register.success": "New app registered in %s", "app.register.features.flag": "Features necessary for the application", @@ -53,55 +51,40 @@ func init() { "app.register.flag.feature.unknown": "Unknown feature %s, skipping", "database.description": "Manage databases on the server", - "database.create.cmd": "create [SERVER] [DOMAIN] [NAME]", "database.create.description": "Create a database of specified type on the server", "database.create.flag.type": "Type of the database server: mysql (default), mssql, or postgresql", "database.create.success": "Database %s successfully created", - "database.delete.cmd": "delete [SERVER] [NAME]", "database.delete.description": "Delete database from the server", "database.delete.success": "Database %s successfully deleted", - "database.list.cmd": "list [SERVER] [DOMAIN]", "database.list.description": "List databases on server, optionally filtered by domain", - "database.deploy.cmd": "upload [SERVER] [DOMAIN] [NAME] [FILE]", "database.deploy.description": "Upload an SQL dump file to the server and deploy it", "database.deploy.success": "Database %s successfully deployed from dump %s", "domain.description": "Manage domains on the server", - "domain.create.cmd": "create [SERVER] [DOMAIN] [IPv4] [IPv6]", "domain.create.description": "Create a new domain on the server with specific IPv4 & IPv6 addresses", "domain.create.success": "Domain %s successfully created", - "domain.list.cmd": "list [SERVER]", "domain.list.description": "List domains on the specific server", - "domain.delete.cmd": "delete [SERVER] [DOMAIN...]", "domain.delete.description": "Delete domain(s) from the specified server", "domain.delete.success": "Domain successfully deleted", - "domain.reload.cmd": "reload [SERVER]", "domain.reload.description": "Reload cached domains for the specified server", "domain.reload.success": "Domains successfully reloaded", - "files.upload.cmd": "sync [SERVER] [DOMAIN] [FILE ...]", "files.upload.description": "Upload files to the target domain", "files.upload.flag.overwrite": "Overwrite existing files", "files.upload.flag.dry-run": "Do not upload files, only show actions", "files.upload.success": "Files successfully uploaded", "server.description": "Manage known servers", - "server.delete.cmd": "delete [IP ADDRESS|HOSTNAME ...]", "server.delete.description": "Remove registered server(s) and flush API key(s)", "server.delete.success": "Server %s removed", - "server.list.cmd": "list", "server.list.description": "List registered servers", - "server.register.cmd": "register [IP ADDRESS|HOSTNAME]", "server.register.description": "Register a new server on this device", "server.register.ignore.ssl.flag": "Ignore SSL certificate mismatch", "server.register.success": "Server successfully registered", - "server.reload.cmd": "reload [IP ADDRESS|HOSTNAME]", "server.reload.description": "Reload cached server data", "server.reload.success": "Server data successfully reloaded", - "server.reauth.cmd": "reauth [IP ADDRESS|HOSTNAME]", "server.reauth.description": "Update server API key", "server.reauth.success": "Server successfully re-authenticated", - "server.login.cmd": "login [SERVER]", "server.login.description": "Automatic login to the specified server", "server.login.success": "Generated login link: %s", "server.login.generate.flag": "Only generate the link (without autologin attempt)",