Browse Source

cmd: refactoring command name

pull/4240/head
Unknwon 8 years ago
parent
commit
7fe13e72d8
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      cmd/admin.go
  2. 2
      cmd/cert.go
  3. 2
      cmd/cert_stub.go
  4. 2
      cmd/dump.go
  5. 2
      cmd/hook.go
  6. 2
      cmd/import.go
  7. 2
      cmd/web.go
  8. 12
      gogs.go

2
cmd/admin.go

@ -14,7 +14,7 @@ import (
) )
var ( var (
CmdAdmin = cli.Command{ Admin = cli.Command{
Name: "admin", Name: "admin",
Usage: "Preform admin operations on command line", Usage: "Preform admin operations on command line",
Description: `Allow using internal logic of Gogs without hacking into the source code Description: `Allow using internal logic of Gogs without hacking into the source code

2
cmd/cert.go

@ -25,7 +25,7 @@ import (
"github.com/urfave/cli" "github.com/urfave/cli"
) )
var CmdCert = cli.Command{ var Cert = cli.Command{
Name: "cert", Name: "cert",
Usage: "Generate self-signed certificate", Usage: "Generate self-signed certificate",
Description: `Generate a self-signed X.509 certificate for a TLS server. Description: `Generate a self-signed X.509 certificate for a TLS server.

2
cmd/cert_stub.go

@ -13,7 +13,7 @@ import (
"github.com/urfave/cli" "github.com/urfave/cli"
) )
var CmdCert = cli.Command{ var Cert = cli.Command{
Name: "cert", Name: "cert",
Usage: "Generate self-signed certificate", Usage: "Generate self-signed certificate",
Description: `Please use build tags "cert" to rebuild Gogs in order to have this ability`, Description: `Please use build tags "cert" to rebuild Gogs in order to have this ability`,

2
cmd/dump.go

@ -21,7 +21,7 @@ import (
"github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/modules/setting"
) )
var CmdDump = cli.Command{ var Dump = cli.Command{
Name: "dump", Name: "dump",
Usage: "Dump Gogs files and database", Usage: "Dump Gogs files and database",
Description: `Dump compresses all related files and database into zip file. Description: `Dump compresses all related files and database into zip file.

2
cmd/hook.go

@ -27,7 +27,7 @@ import (
) )
var ( var (
CmdHook = cli.Command{ Hook = cli.Command{
Name: "hook", Name: "hook",
Usage: "Delegate commands to corresponding Git hooks", Usage: "Delegate commands to corresponding Git hooks",
Description: "All sub-commands should only be called by Git", Description: "All sub-commands should only be called by Git",

2
cmd/import.go

@ -19,7 +19,7 @@ import (
) )
var ( var (
CmdImport = cli.Command{ Import = cli.Command{
Name: "import", Name: "import",
Usage: "Import portable data as local Gogs data", Usage: "Import portable data as local Gogs data",
Description: `Allow user import data from other Gogs installations to local instance Description: `Allow user import data from other Gogs installations to local instance

2
cmd/web.go

@ -49,7 +49,7 @@ import (
"github.com/gogits/gogs/routers/user" "github.com/gogits/gogs/routers/user"
) )
var CmdWeb = cli.Command{ var Web = cli.Command{
Name: "web", Name: "web",
Usage: "Start Gogs web server", Usage: "Start Gogs web server",
Description: `Gogs web server is the only thing you need to run, Description: `Gogs web server is the only thing you need to run,

12
gogs.go

@ -28,13 +28,13 @@ func main() {
app.Usage = "A painless self-hosted Git service" app.Usage = "A painless self-hosted Git service"
app.Version = APP_VER app.Version = APP_VER
app.Commands = []cli.Command{ app.Commands = []cli.Command{
cmd.CmdWeb, cmd.Web,
cmd.Serv, cmd.Serv,
cmd.CmdHook, cmd.Hook,
cmd.CmdDump, cmd.Dump,
cmd.CmdCert, cmd.Cert,
cmd.CmdAdmin, cmd.Admin,
cmd.CmdImport, cmd.Import,
} }
app.Flags = append(app.Flags, []cli.Flag{}...) app.Flags = append(app.Flags, []cli.Flag{}...)
app.Run(os.Args) app.Run(os.Args)

Loading…
Cancel
Save