Skip to content

Commit eaa7dba

Browse files
committed
Changed -help output
1 parent 7b0dacf commit eaa7dba

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

shell2telegram.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,22 @@ type BotMessage struct {
9090
// ----------------------------------------------------------------------------
9191
// get config
9292
func getConfig() (commands Commands, appConfig Config, err error) {
93-
flag.StringVar(&appConfig.token, "tb-token", "", "setting bot token (or set TB_TOKEN variable)")
93+
flag.StringVar(&appConfig.token, "tb-token", "", "setting bot `token` (or set TB_TOKEN variable)")
9494
flag.BoolVar(&appConfig.addExit, "add-exit", false, "adding \"/shell2telegram exit\" command for terminate bot (for roots only)")
95-
flag.IntVar(&appConfig.botTimeout, "timeout", DefaultBotTimeout, "setting timeout for bot")
96-
flag.StringVar(&appConfig.bindAddr, "bind-addr", "", "bind address to listen webhook requests, like: 0.0.0.0:8080")
97-
flag.Var(&urlValue{&appConfig.webhookURL}, "webhook", "url of bot's webhook")
95+
flag.IntVar(&appConfig.botTimeout, "timeout", DefaultBotTimeout, "setting timeout for bot (in `seconds`)")
96+
flag.StringVar(&appConfig.bindAddr, "bind-addr", "", "bind address to listen webhook requests, like: `0.0.0.0:8080`")
97+
flag.Var(&urlValue{&appConfig.webhookURL}, "webhook", "`url` of bot's webhook")
9898
flag.BoolVar(&appConfig.allowAll, "allow-all", false, "allow all users (DANGEROUS!)")
9999
flag.BoolVar(&appConfig.logCommands, "log-commands", false, "logging all commands")
100100
flag.StringVar(&appConfig.description, "description", "", "setting description of bot")
101101
flag.BoolVar(&appConfig.persistentUsers, "persistent-users", false, "load/save users from file (default ~/.config/shell2telegram.json)")
102-
flag.StringVar(&appConfig.usersDB, "users-db", "", "file for store users")
103-
flag.IntVar(&appConfig.cache, "cache", 0, "caching command out (in seconds)")
102+
flag.StringVar(&appConfig.usersDB, "users-db", "", "`file` for store users")
103+
flag.IntVar(&appConfig.cache, "cache", 0, "caching command out (in `seconds`)")
104104
flag.BoolVar(&appConfig.isPublicBot, "public", false, "bot is public (don't add /auth* commands)")
105-
flag.IntVar(&appConfig.shTimeout, "sh-timeout", 0, "set timeout for execute shell command (in seconds)")
105+
flag.IntVar(&appConfig.shTimeout, "sh-timeout", 0, "set timeout for execute shell command (in `seconds`)")
106106
flag.StringVar(&appConfig.shell, "shell", "sh", "custom shell or \"\" for execute without shell")
107107
flag.BoolVar(&appConfig.oneThread, "one-thread", false, "run each shell command in one thread")
108-
logFilename := flag.String("log", "", "log filename, default - STDOUT")
108+
logFilename := flag.String("log", "", "log `filename`, default - STDOUT")
109109
predefinedAllowedUsers := flag.String("allow-users", "", "telegram users who are allowed to chat with the bot (\"user1,user2\")")
110110
predefinedRootUsers := flag.String("root-users", "", "telegram users, who confirms new users in their private chat (\"user1,user2\")")
111111
version := flag.Bool("version", false, "get version")

0 commit comments

Comments
 (0)