rename token name.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-10-04 22:34:20 +08:00
parent f80e79f1c6
commit 82886172dd
2 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ Execute from the working directory:
```
docker run --rm \
-e PLUGIN_TELEGRAM_TOKEN=xxxxxxx \
-e PLUGIN_TOKEN=xxxxxxx \
-e PLUGIN_TO=xxxxxxx \
-e PLUGIN_MESSAGE=test \
-e PLUGIN_DEBUG=true \

View File

@ -18,9 +18,9 @@ func main() {
app.Version = Version
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "telegram.token",
Name: "token",
Usage: "telegram token",
EnvVar: "PLUGIN_TELEGRAM_TOKEN,TELEGRAM_TOKEN",
EnvVar: "PLUGIN_TOKEN,TELEGRAM_TOKEN",
},
cli.StringSliceFlag{
Name: "to",
@ -111,7 +111,7 @@ func run(c *cli.Context) error {
Link: c.String("build.link"),
},
Config: Config{
Token: c.String("telegram.token"),
Token: c.String("token"),
Debug: c.Bool("debug"),
To: c.StringSlice("to"),
Message: c.StringSlice("message"),