diff options
author | Matthias Loibl <mail@matthiasloibl.com> | 2016-11-09 23:18:22 +0100 |
---|---|---|
committer | Matthias Loibl <mail@matthiasloibl.com> | 2016-11-09 23:18:22 +0100 |
commit | 5cd093aa467ada0017f9056163346f419c0fa546 (patch) | |
tree | b8055aad9a6554b6f71fcbd9909fd3bb668b0e2c /cmd/admin.go | |
parent | 475ddd8d8922b829a39189de7db4b6257938d81c (diff) | |
download | gitea-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/admin.go')
-rw-r--r-- | cmd/admin.go | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/cmd/admin.go b/cmd/admin.go index de77143f29..5e56f171bf 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -30,11 +30,28 @@ to make automatic initialization process more smoothly`, Usage: "Create a new user in database", Action: runCreateUser, Flags: []cli.Flag{ - stringFlag("name", "", "Username"), - stringFlag("password", "", "User password"), - stringFlag("email", "", "User email address"), - boolFlag("admin", "User is an admin"), - stringFlag("config, c", "custom/conf/app.ini", "Custom configuration file path"), + cli.StringFlag{ + Name: "name", + Value: "", + Usage: "Username", + }, + cli.StringFlag{ + Name: "password", + Value: "", Usage: "User password", + }, + cli.StringFlag{ + Name: "email", + Value: "", Usage: "User email address", + }, + cli.BoolFlag{ + Name: "admin", + Usage: "User is an admin", + }, + cli.StringFlag{ + Name: "config, c", + Value: "custom/conf/app.ini", + Usage: "Custom configuration file path", + }, }, } ) |