summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2017-04-12 15:44:54 +0800
committerGitHub <noreply@github.com>2017-04-12 15:44:54 +0800
commit22295944dff9da50cde6c1abb0d8ea4cff753bdf (patch)
treed2d82cf0e367b3ac362558a2fbba12a023460e2a /cmd
parentbe6edaddcba1e607884539a250bd19debabba751 (diff)
downloadgitea-22295944dff9da50cde6c1abb0d8ea4cff753bdf.tar.gz
gitea-22295944dff9da50cde6c1abb0d8ea4cff753bdf.zip
refactor: show command help message. (#1486)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/admin.go4
-rw-r--r--cmd/dump.go1
-rw-r--r--cmd/serv.go4
-rw-r--r--cmd/web_graceful.go1
4 files changed, 7 insertions, 3 deletions
diff --git a/cmd/admin.go b/cmd/admin.go
index d4240e17c0..aec1b8dad4 100644
--- a/cmd/admin.go
+++ b/cmd/admin.go
@@ -8,10 +8,10 @@ package cmd
import (
"fmt"
- "github.com/urfave/cli"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/setting"
+
+ "github.com/urfave/cli"
)
var (
diff --git a/cmd/dump.go b/cmd/dump.go
index ad095ed3b4..98478c17be 100644
--- a/cmd/dump.go
+++ b/cmd/dump.go
@@ -16,6 +16,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/setting"
+
"github.com/Unknwon/cae/zip"
"github.com/Unknwon/com"
"github.com/urfave/cli"
diff --git a/cmd/serv.go b/cmd/serv.go
index e3aeb41c56..d7e89ab98d 100644
--- a/cmd/serv.go
+++ b/cmd/serv.go
@@ -17,6 +17,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
+
"github.com/Unknwon/com"
"github.com/dgrijalva/jwt-go"
"github.com/urfave/cli"
@@ -105,7 +106,8 @@ func runServ(c *cli.Context) error {
}
if len(c.Args()) < 1 {
- fail("Not enough arguments", "Not enough arguments")
+ cli.ShowSubcommandHelp(c)
+ return nil
}
cmd := os.Getenv("SSH_ORIGINAL_COMMAND")
diff --git a/cmd/web_graceful.go b/cmd/web_graceful.go
index b0b3093b68..e54561f163 100644
--- a/cmd/web_graceful.go
+++ b/cmd/web_graceful.go
@@ -11,6 +11,7 @@ import (
"net/http"
"code.gitea.io/gitea/modules/log"
+
"github.com/facebookgo/grace/gracehttp"
)