Skip to content

Commit 5b58a2a

Browse files
author
Syfaro
committed
Omitempty for ReplyMarkup.
1 parent ee1d537 commit 5b58a2a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

types.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ type InlineQueryResultArticle struct {
348348
ID string `json:"id"` // required
349349
Title string `json:"title"` // required
350350
InputMessageContent interface{} `json:"input_message_content"` // required
351-
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
351+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
352352
URL string `json:"url"`
353353
HideURL bool `json:"hide_url"`
354354
Description string `json:"description"`
@@ -369,7 +369,7 @@ type InlineQueryResultPhoto struct {
369369
Title string `json:"title"`
370370
Description string `json:"description"`
371371
Caption string `json:"caption"`
372-
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
372+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
373373
InputMessageContent interface{} `json:"input_message_content"`
374374
}
375375

@@ -383,7 +383,7 @@ type InlineQueryResultGIF struct {
383383
ThumbURL string `json:"thumb_url"`
384384
Title string `json:"title"`
385385
Caption string `json:"caption"`
386-
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
386+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
387387
InputMessageContent interface{} `json:"input_message_content"`
388388
}
389389

@@ -397,7 +397,7 @@ type InlineQueryResultMPEG4GIF struct {
397397
ThumbURL string `json:"thumb_url"`
398398
Title string `json:"title"`
399399
Caption string `json:"caption"`
400-
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
400+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
401401
InputMessageContent interface{} `json:"input_message_content"`
402402
}
403403

@@ -414,7 +414,7 @@ type InlineQueryResultVideo struct {
414414
Height int `json:"video_height"`
415415
Duration int `json:"video_duration"`
416416
Description string `json:"description"`
417-
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
417+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
418418
InputMessageContent interface{} `json:"input_message_content"`
419419
}
420420

@@ -426,7 +426,7 @@ type InlineQueryResultAudio struct {
426426
Title string `json:"title"` // required
427427
Performer string `json:"performer"`
428428
Duration int `json:"audio_duration"`
429-
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
429+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
430430
InputMessageContent interface{} `json:"input_message_content"`
431431
}
432432

@@ -437,7 +437,7 @@ type InlineQueryResultVoice struct {
437437
URL string `json:"voice_url"` // required
438438
Title string `json:"title"` // required
439439
Duration int `json:"voice_duration"`
440-
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
440+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
441441
InputMessageContent interface{} `json:"input_message_content"`
442442
}
443443

@@ -450,7 +450,7 @@ type InlineQueryResultDocument struct {
450450
URL string `json:"document_url"` // required
451451
MimeType string `json:"mime_type"` // required
452452
Description string `json:"description"`
453-
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
453+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
454454
InputMessageContent interface{} `json:"input_message_content"`
455455
ThumbURL string `json:"thumb_url"`
456456
ThumbWidth int `json:"thumb_width"`
@@ -464,7 +464,7 @@ type InlineQueryResultLocation struct {
464464
Latitude float64 `json:"latitude"` // required
465465
Longitude float64 `json:"longitude"` // required
466466
Title string `json:"title"` // required
467-
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
467+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
468468
InputMessageContent interface{} `json:"input_message_content"`
469469
ThumbURL string `json:"thumb_url"`
470470
ThumbWidth int `json:"thumb_width"`

0 commit comments

Comments
 (0)