From d6387573590e080c9f336a059056a970fdfed5db Mon Sep 17 00:00:00 2001 From: Gleb Sinyavsky Date: Sat, 21 Nov 2015 17:39:19 +0300 Subject: [PATCH] go fmt --- bot.go | 12 ++++++------ types.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bot.go b/bot.go index 2f1ede1..bbda4c9 100644 --- a/bot.go +++ b/bot.go @@ -13,16 +13,16 @@ import ( "net/url" "os" "strconv" - "time" "strings" + "time" ) // BotAPI has methods for interacting with all of Telegram's Bot API endpoints. type BotAPI struct { - Token string `json:"token"` - Debug bool `json:"debug"` - Self User `json:"-"` - Client *http.Client `json:"-"` + Token string `json:"token"` + Debug bool `json:"debug"` + Self User `json:"-"` + Client *http.Client `json:"-"` } // NewBotAPI creates a new BotAPI instance. @@ -198,7 +198,7 @@ func (bot *BotAPI) GetMe() (User, error) { return user, nil } -func (bot *BotAPI) IsMessageToMe(message Message) (bool) { +func (bot *BotAPI) IsMessageToMe(message Message) bool { return strings.Contains(message.Text, "@"+bot.Self.UserName) } diff --git a/types.go b/types.go index 40bb93a..f2eb920 100644 --- a/types.go +++ b/types.go @@ -3,8 +3,8 @@ package tgbotapi import ( "encoding/json" "fmt" - "time" "strings" + "time" ) // APIResponse is a response from the Telegram API with the result stored raw.