Fixed typos

pull/281/head
Sergey Parshukov 6 years ago
parent 96edc748b5
commit e9a86f840c
No known key found for this signature in database
GPG Key ID: 9D0FB8D5E702923A
  1. 2
      bot.go
  2. 8
      bot_test.go
  3. 2
      configs.go
  4. 8
      types.go

@ -108,7 +108,7 @@ func (bot *BotAPI) decodeAPIResponse(responseBody io.Reader, resp *APIResponse)
return return
} }
// if debug, read reponse body // if debug, read response body
data, err := ioutil.ReadAll(responseBody) data, err := ioutil.ReadAll(responseBody)
if err != nil { if err != nil {
return return

@ -37,7 +37,7 @@ func getBot(t *testing.T) (*tgbotapi.BotAPI, error) {
return bot, err return bot, err
} }
func TestNewBotAPI_notoken(t *testing.T) { func TestNewBotAPI_NoToken(t *testing.T) {
_, err := tgbotapi.NewBotAPI("") _, err := tgbotapi.NewBotAPI("")
if err == nil { if err == nil {
@ -506,9 +506,9 @@ func TestSetWebhookWithoutCert(t *testing.T) {
func TestUpdatesChan(t *testing.T) { func TestUpdatesChan(t *testing.T) {
bot, _ := getBot(t) bot, _ := getBot(t)
var ucfg tgbotapi.UpdateConfig = tgbotapi.NewUpdate(0) var cfg tgbotapi.UpdateConfig = tgbotapi.NewUpdate(0)
ucfg.Timeout = 60 cfg.Timeout = 60
_, err := bot.GetUpdatesChan(ucfg) _, err := bot.GetUpdatesChan(cfg)
if err != nil { if err != nil {
t.Error(err) t.Error(err)

@ -1132,7 +1132,7 @@ type ShippingConfig struct {
ErrorMessage string ErrorMessage string
} }
// PreCheckoutConfig conatins information for answerPreCheckoutQuery request. // PreCheckoutConfig contains information for answerPreCheckoutQuery request.
type PreCheckoutConfig struct { type PreCheckoutConfig struct {
PreCheckoutQueryID string // required PreCheckoutQueryID string // required
OK bool // required OK bool // required

@ -578,10 +578,10 @@ type WebhookInfo struct {
// LoginURL contains fields that allows user to login to webpage // LoginURL contains fields that allows user to login to webpage
type LoginURL struct { type LoginURL struct {
URL string `json:"url"` URL string `json:"url"`
ForwardText *string `json:"forward_text,omitempty"` ForwardText *string `json:"forward_text,omitempty"`
BotUsername *string `json:"bot_username,omitempty"` BotUsername *string `json:"bot_username,omitempty"`
RequestWriteAcces *bool `json:"request_write_access,omitempty"` RequestWriteAccess *bool `json:"request_write_access,omitempty"`
} }
// IsSet returns true if a webhook is currently set. // IsSet returns true if a webhook is currently set.