update gorush cli.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-06-12 19:25:06 +08:00
parent 6be5e24833
commit 17a089e89e
2 changed files with 7 additions and 7 deletions

View File

@ -114,13 +114,13 @@ Server Options:
-m, --message <message> Notification message
-t, --token <token> Notification token
iOS Options:
-i, --pem <file> certificate key file path
-i, --key <file> certificate key file path
-P, --password <password> certificate key password
--topic <topic> iOS topic
--ios enabled iOS (default: false)
--production iOS production mode (default: false)
Android Options:
-k, --key <api_key> Android API Key
-k, --apikey <api_key> Android API Key
--android enabled android (default: false)
Common Options:
-h, --help Show this message
@ -148,7 +148,7 @@ $ gorush -ios -m="your message" -i="your certificate path" -t="device token" -to
```
* `-m`: Notification message.
* `-i`: Apple Push Notification Certificate path (`pem` file).
* `-i`: Apple Push Notification Certificate path (`pem` or `p12` file).
* `-t`: Device token.
* `-topic`: The topic of the remote notification.
* `-password`: The certificate password.

View File

@ -30,13 +30,13 @@ Server Options:
-m, --message <message> Notification message
-t, --token <token> Notification token
iOS Options:
-i, --pem <file> certificate key file path
-i, --key <file> certificate key file path
-P, --password <password> certificate key password
--topic <topic> iOS topic
--ios enabled iOS (default: false)
--production iOS production mode (default: false)
Android Options:
-k, --key <api_key> Android API Key
-k, --apikey <api_key> Android API Key
--android enabled android (default: false)
Common Options:
-h, --help Show this message
@ -63,11 +63,11 @@ func main() {
flag.StringVar(&configFile, "c", "", "Configuration file.")
flag.StringVar(&configFile, "config", "", "Configuration file.")
flag.StringVar(&opts.Ios.KeyPath, "i", "", "iOS certificate key file path")
flag.StringVar(&opts.Ios.KeyPath, "pem", "", "iOS certificate key file path")
flag.StringVar(&opts.Ios.KeyPath, "key", "", "iOS certificate key file path")
flag.StringVar(&opts.Ios.Password, "P", "", "iOS certificate password for gorush")
flag.StringVar(&opts.Ios.Password, "password", "", "iOS certificate password for gorush")
flag.StringVar(&opts.Android.APIKey, "k", "", "Android api key configuration for gorush")
flag.StringVar(&opts.Android.APIKey, "key", "", "Android api key configuration for gorush")
flag.StringVar(&opts.Android.APIKey, "apikey", "", "Android api key configuration for gorush")
flag.StringVar(&opts.Core.Port, "p", "", "port number for gorush")
flag.StringVar(&opts.Core.Port, "port", "", "port number for gorush")
flag.StringVar(&token, "t", "", "token string")