Skip to content

Commit 902c248

Browse files
committed
Refactoring
1 parent 0bdfb10 commit 902c248

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

commands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func cmdShell2telegramRm(ctx Ctx) (replayMsg string) {
219219

220220
// /shell2telegram version - get version
221221
func cmdShell2telegramVersion(_ Ctx) (replayMsg string) {
222-
replayMsg = fmt.Sprintf("shell2telegram %s", Version)
222+
replayMsg = fmt.Sprintf("shell2telegram %s", version)
223223
return replayMsg
224224
}
225225

shell2telegram.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
)
1818

1919
const (
20-
// Version - current version
21-
Version = "1.8"
20+
// version - current version
21+
version = "1.8"
2222

2323
// DefaultBotTimeout - bot default timeout
2424
DefaultBotTimeout = 60
@@ -108,7 +108,7 @@ func getConfig() (commands Commands, appConfig Config, err error) {
108108
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\")")
111-
version := flag.Bool("version", false, "get version")
111+
showVersion := flag.Bool("version", false, "get version")
112112

113113
flag.Usage = func() {
114114
fmt.Printf("usage: %s [options] %s\n%s\n%s\n\noptions:\n",
@@ -122,8 +122,8 @@ func getConfig() (commands Commands, appConfig Config, err error) {
122122
}
123123
flag.Parse()
124124

125-
if *version {
126-
fmt.Println(Version)
125+
if *showVersion {
126+
fmt.Println(version)
127127
os.Exit(0)
128128
}
129129

0 commit comments

Comments
 (0)