rename token name.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
f80e79f1c6
commit
82886172dd
@ -42,7 +42,7 @@ Execute from the working directory:
|
|||||||
|
|
||||||
```
|
```
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-e PLUGIN_TELEGRAM_TOKEN=xxxxxxx \
|
-e PLUGIN_TOKEN=xxxxxxx \
|
||||||
-e PLUGIN_TO=xxxxxxx \
|
-e PLUGIN_TO=xxxxxxx \
|
||||||
-e PLUGIN_MESSAGE=test \
|
-e PLUGIN_MESSAGE=test \
|
||||||
-e PLUGIN_DEBUG=true \
|
-e PLUGIN_DEBUG=true \
|
||||||
|
6
main.go
6
main.go
@ -18,9 +18,9 @@ func main() {
|
|||||||
app.Version = Version
|
app.Version = Version
|
||||||
app.Flags = []cli.Flag{
|
app.Flags = []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "telegram.token",
|
Name: "token",
|
||||||
Usage: "telegram token",
|
Usage: "telegram token",
|
||||||
EnvVar: "PLUGIN_TELEGRAM_TOKEN,TELEGRAM_TOKEN",
|
EnvVar: "PLUGIN_TOKEN,TELEGRAM_TOKEN",
|
||||||
},
|
},
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "to",
|
Name: "to",
|
||||||
@ -111,7 +111,7 @@ func run(c *cli.Context) error {
|
|||||||
Link: c.String("build.link"),
|
Link: c.String("build.link"),
|
||||||
},
|
},
|
||||||
Config: Config{
|
Config: Config{
|
||||||
Token: c.String("telegram.token"),
|
Token: c.String("token"),
|
||||||
Debug: c.Bool("debug"),
|
Debug: c.Bool("debug"),
|
||||||
To: c.StringSlice("to"),
|
To: c.StringSlice("to"),
|
||||||
Message: c.StringSlice("message"),
|
Message: c.StringSlice("message"),
|
||||||
|
Loading…
Reference in New Issue
Block a user