talk: Read a bit better from file

This commit is contained in:
Hamcha 2017-05-09 13:39:08 +02:00
parent c20eab1cd5
commit 76c4a672fc

View file

@ -60,7 +60,7 @@ func inittalk() {
if err != nil { if err != nil {
panic(err) panic(err)
} }
*talktoken = string(data) *talktoken = strings.TrimSpace(string(data))
} }
if *talktoken == "" { if *talktoken == "" {
panic(fmt.Errorf("API token for api.ai must be provided! (provide it or --disable talk)")) panic(fmt.Errorf("API token for api.ai must be provided! (provide it or --disable talk)"))