summaryrefslogtreecommitdiffstats
path: root/cmd/dump.go
diff options
context:
space:
mode:
authorMatthias Loibl <mail@matthiasloibl.com>2016-11-09 23:18:22 +0100
committerMatthias Loibl <mail@matthiasloibl.com>2016-11-09 23:18:22 +0100
commit5cd093aa467ada0017f9056163346f419c0fa546 (patch)
treeb8055aad9a6554b6f71fcbd9909fd3bb668b0e2c /cmd/dump.go
parent475ddd8d8922b829a39189de7db4b6257938d81c (diff)
downloadgitea-5cd093aa467ada0017f9056163346f419c0fa546.tar.gz
gitea-5cd093aa467ada0017f9056163346f419c0fa546.zip
Use cli Flags directly and not some helper funcs
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
Diffstat (limited to 'cmd/dump.go')
-rw-r--r--cmd/dump.go23
1 files changed, 16 insertions, 7 deletions
diff --git a/cmd/dump.go b/cmd/dump.go
index 8af76e2fc7..60eace35f0 100644
--- a/cmd/dump.go
+++ b/cmd/dump.go
@@ -6,18 +6,16 @@ package cmd
import (
"fmt"
+ "io/ioutil"
"log"
"os"
"path"
"time"
- "io/ioutil"
-
"github.com/Unknwon/cae/zip"
- "github.com/urfave/cli"
-
"github.com/go-gitea/gitea/models"
"github.com/go-gitea/gitea/modules/setting"
+ "github.com/urfave/cli"
)
// CmdDump represents the available dump sub-command.
@@ -28,9 +26,20 @@ var CmdDump = cli.Command{
It can be used for backup and capture Gogs server image to send to maintainer`,
Action: runDump,
Flags: []cli.Flag{
- stringFlag("config, c", "custom/conf/app.ini", "Custom configuration file path"),
- boolFlag("verbose, v", "Show process details"),
- stringFlag("tempdir, t", os.TempDir(), "Temporary dir path"),
+ cli.StringFlag{
+ Name: "config, c",
+ Value: "custom/conf/app.ini",
+ Usage: "Custom configuration file path",
+ },
+ cli.BoolFlag{
+ Name: "verbose, v",
+ Usage: "Show process details",
+ },
+ cli.StringFlag{
+ Name: "tempdir, t",
+ Value: os.TempDir(),
+ Usage: "Temporary dir path",
+ },
},
}