mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 10:22:30 +08:00
CLI: Remove redundant Cmd prefix from commands
This commit is contained in:
4
main.go
4
main.go
@ -31,8 +31,8 @@ func main() {
|
|||||||
app.Name = "Grafana Backend"
|
app.Name = "Grafana Backend"
|
||||||
app.Usage = "grafana web"
|
app.Usage = "grafana web"
|
||||||
app.Version = version
|
app.Version = version
|
||||||
app.Commands = []cli.Command{cmd.CmdWeb, cmd.CmdImportJson,
|
app.Commands = []cli.Command{cmd.Web, cmd.ImportJson,
|
||||||
cmd.CmdListAccounts, cmd.CmdCreateAccount, cmd.CmdDeleteAccount}
|
cmd.ListAccounts, cmd.CreateAccount, cmd.DeleteAccount}
|
||||||
app.Flags = append(app.Flags, []cli.Flag{}...)
|
app.Flags = append(app.Flags, []cli.Flag{}...)
|
||||||
app.Run(os.Args)
|
app.Run(os.Args)
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
"text/tabwriter"
|
"text/tabwriter"
|
||||||
)
|
)
|
||||||
|
|
||||||
var CmdListAccounts = cli.Command{
|
var ListAccounts = cli.Command{
|
||||||
Name: "account",
|
Name: "account",
|
||||||
Usage: "list accounts",
|
Usage: "list accounts",
|
||||||
Description: "Lists the accounts in the system",
|
Description: "Lists the accounts in the system",
|
||||||
@ -26,7 +26,7 @@ var CmdListAccounts = cli.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var CmdCreateAccount = cli.Command{
|
var CreateAccount = cli.Command{
|
||||||
Name: "account:create",
|
Name: "account:create",
|
||||||
Usage: "create a new account",
|
Usage: "create a new account",
|
||||||
Description: "Creates a new account",
|
Description: "Creates a new account",
|
||||||
@ -40,7 +40,7 @@ var CmdCreateAccount = cli.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var CmdDeleteAccount = cli.Command{
|
var DeleteAccount = cli.Command{
|
||||||
Name: "account:delete",
|
Name: "account:delete",
|
||||||
Usage: "delete an existing account",
|
Usage: "delete an existing account",
|
||||||
Description: "Deletes an existing account",
|
Description: "Deletes an existing account",
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
"github.com/grafana/grafana/pkg/setting"
|
"github.com/grafana/grafana/pkg/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
var CmdImportJson = cli.Command{
|
var ImportJson = cli.Command{
|
||||||
Name: "import-json",
|
Name: "import-json",
|
||||||
Usage: "grafana import",
|
Usage: "grafana import",
|
||||||
Description: "Starts Grafana import process",
|
Description: "Starts Grafana import process",
|
||||||
|
@ -22,7 +22,7 @@ import (
|
|||||||
"github.com/grafana/grafana/pkg/social"
|
"github.com/grafana/grafana/pkg/social"
|
||||||
)
|
)
|
||||||
|
|
||||||
var CmdWeb = cli.Command{
|
var Web = cli.Command{
|
||||||
Name: "web",
|
Name: "web",
|
||||||
Usage: "grafana web",
|
Usage: "grafana web",
|
||||||
Description: "Starts Grafana backend & web server",
|
Description: "Starts Grafana backend & web server",
|
||||||
|
Reference in New Issue
Block a user