From e9a86f840cd06e573a441e382a9b46bd5ba1ef45 Mon Sep 17 00:00:00 2001 From: Sergey Parshukov Date: Wed, 2 Oct 2019 14:13:57 +0300 Subject: [PATCH] Fixed typos --- bot.go | 2 +- bot_test.go | 8 ++++---- configs.go | 2 +- types.go | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bot.go b/bot.go index 8b7e872..b88213d 100644 --- a/bot.go +++ b/bot.go @@ -108,7 +108,7 @@ func (bot *BotAPI) decodeAPIResponse(responseBody io.Reader, resp *APIResponse) return } - // if debug, read reponse body + // if debug, read response body data, err := ioutil.ReadAll(responseBody) if err != nil { return diff --git a/bot_test.go b/bot_test.go index 8de5301..dcbfaf1 100644 --- a/bot_test.go +++ b/bot_test.go @@ -37,7 +37,7 @@ func getBot(t *testing.T) (*tgbotapi.BotAPI, error) { return bot, err } -func TestNewBotAPI_notoken(t *testing.T) { +func TestNewBotAPI_NoToken(t *testing.T) { _, err := tgbotapi.NewBotAPI("") if err == nil { @@ -506,9 +506,9 @@ func TestSetWebhookWithoutCert(t *testing.T) { func TestUpdatesChan(t *testing.T) { bot, _ := getBot(t) - var ucfg tgbotapi.UpdateConfig = tgbotapi.NewUpdate(0) - ucfg.Timeout = 60 - _, err := bot.GetUpdatesChan(ucfg) + var cfg tgbotapi.UpdateConfig = tgbotapi.NewUpdate(0) + cfg.Timeout = 60 + _, err := bot.GetUpdatesChan(cfg) if err != nil { t.Error(err) diff --git a/configs.go b/configs.go index 3546415..bdf00b6 100644 --- a/configs.go +++ b/configs.go @@ -1132,7 +1132,7 @@ type ShippingConfig struct { ErrorMessage string } -// PreCheckoutConfig conatins information for answerPreCheckoutQuery request. +// PreCheckoutConfig contains information for answerPreCheckoutQuery request. type PreCheckoutConfig struct { PreCheckoutQueryID string // required OK bool // required diff --git a/types.go b/types.go index e630de0..4273cd2 100644 --- a/types.go +++ b/types.go @@ -578,10 +578,10 @@ type WebhookInfo struct { // LoginURL contains fields that allows user to login to webpage type LoginURL struct { - URL string `json:"url"` - ForwardText *string `json:"forward_text,omitempty"` - BotUsername *string `json:"bot_username,omitempty"` - RequestWriteAcces *bool `json:"request_write_access,omitempty"` + URL string `json:"url"` + ForwardText *string `json:"forward_text,omitempty"` + BotUsername *string `json:"bot_username,omitempty"` + RequestWriteAccess *bool `json:"request_write_access,omitempty"` } // IsSet returns true if a webhook is currently set.