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/cert.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/cert.go')
-rw-r--r-- | cmd/cert.go | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/cmd/cert.go b/cmd/cert.go index 2212d2972d..c30d4ddb70 100644 --- a/cmd/cert.go +++ b/cmd/cert.go @@ -33,12 +33,35 @@ var CmdCert = cli.Command{ Outputs to 'cert.pem' and 'key.pem' and will overwrite existing files.`, Action: runCert, Flags: []cli.Flag{ - stringFlag("host", "", "Comma-separated hostnames and IPs to generate a certificate for"), - stringFlag("ecdsa-curve", "", "ECDSA curve to use to generate a key. Valid values are P224, P256, P384, P521"), - intFlag("rsa-bits", 2048, "Size of RSA key to generate. Ignored if --ecdsa-curve is set"), - stringFlag("start-date", "", "Creation date formatted as Jan 1 15:04:05 2011"), - durationFlag("duration", 365*24*time.Hour, "Duration that certificate is valid for"), - boolFlag("ca", "whether this cert should be its own Certificate Authority"), + cli.StringFlag{ + Name: "host", + Value: "", + Usage: "Comma-separated hostnames and IPs to generate a certificate for", + }, + cli.StringFlag{ + Name: "ecdsa-curve", + Value: "", + Usage: "ECDSA curve to use to generate a key. Valid values are P224, P256, P384, P521", + }, + cli.IntFlag{ + Name: "rsa-bits", + Value: 2048, + Usage: "Size of RSA key to generate. Ignored if --ecdsa-curve is set", + }, + cli.StringFlag{ + Name: "start-date", + Value: "", + Usage: "Creation date formatted as Jan 1 15:04:05 2011", + }, + cli.DurationFlag{ + Name: "duration", + Value: 365 * 24 * time.Hour, + Usage: "Duration that certificate is valid for", + }, + cli.BoolFlag{ + Name: "ca", + Usage: "whether this cert should be its own Certificate Authority", + }, }, } |