Browse Source

Fix bug regarding trailing whitespace in token

master
Kenneth Bruen 1 year ago
parent
commit
faa17a12d6
Signed by: kbruen
GPG Key ID: C1980A470C3EE5B1
  1. 1
      main.go

1
main.go

@ -54,6 +54,7 @@ func main() {
log.SetOutput(os.Stderr) log.SetOutput(os.Stderr)
botToken := os.Getenv("CFR_BOT.TOKEN") botToken := os.Getenv("CFR_BOT.TOKEN")
botToken = strings.TrimSpace(botToken)
if len(botToken) == 0 { if len(botToken) == 0 {
log.Fatal("ERROR: No bot token supplied; supply with CFR_BOT.TOKEN") log.Fatal("ERROR: No bot token supplied; supply with CFR_BOT.TOKEN")
} }

Loading…
Cancel
Save