package tg
import (
"context"
"errors"
"fmt"
"sort"
"strings"
"go.uber.org/multierr"
"github.com/gotd/td/bin"
"github.com/gotd/td/tdjson"
"github.com/gotd/td/tdp"
"github.com/gotd/td/tgerr"
)
var (
_ = bin .Buffer {}
_ = context .Background ()
_ = fmt .Stringer (nil )
_ = strings .Builder {}
_ = errors .Is
_ = multierr .AppendInto
_ = sort .Ints
_ = tdp .Format
_ = tgerr .Error {}
_ = tdjson .Encoder {}
)
type ReplyKeyboardHide struct {
Flags bin .Fields
Selective bool
}
const ReplyKeyboardHideTypeID = 0xa03e5b85
func (r ReplyKeyboardHide ) construct () ReplyMarkupClass { return &r }
var (
_ bin .Encoder = &ReplyKeyboardHide {}
_ bin .Decoder = &ReplyKeyboardHide {}
_ bin .BareEncoder = &ReplyKeyboardHide {}
_ bin .BareDecoder = &ReplyKeyboardHide {}
_ ReplyMarkupClass = &ReplyKeyboardHide {}
)
func (r *ReplyKeyboardHide ) Zero () bool {
if r == nil {
return true
}
if !(r .Flags .Zero ()) {
return false
}
if !(r .Selective == false ) {
return false
}
return true
}
func (r *ReplyKeyboardHide ) String () string {
if r == nil {
return "ReplyKeyboardHide(nil)"
}
type Alias ReplyKeyboardHide
return fmt .Sprintf ("ReplyKeyboardHide%+v" , Alias (*r ))
}
func (r *ReplyKeyboardHide ) FillFrom (from interface {
GetSelective () (value bool )
}) {
r .Selective = from .GetSelective ()
}
func (*ReplyKeyboardHide ) TypeID () uint32 {
return ReplyKeyboardHideTypeID
}
func (*ReplyKeyboardHide ) TypeName () string {
return "replyKeyboardHide"
}
func (r *ReplyKeyboardHide ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "replyKeyboardHide" ,
ID : ReplyKeyboardHideTypeID ,
}
if r == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Selective" ,
SchemaName : "selective" ,
Null : !r .Flags .Has (2 ),
},
}
return typ
}
func (r *ReplyKeyboardHide ) SetFlags () {
if !(r .Selective == false ) {
r .Flags .Set (2 )
}
}
func (r *ReplyKeyboardHide ) Encode (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't encode replyKeyboardHide#a03e5b85 as nil" )
}
b .PutID (ReplyKeyboardHideTypeID )
return r .EncodeBare (b )
}
func (r *ReplyKeyboardHide ) EncodeBare (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't encode replyKeyboardHide#a03e5b85 as nil" )
}
r .SetFlags ()
if err := r .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode replyKeyboardHide#a03e5b85: field flags: %w" , err )
}
return nil
}
func (r *ReplyKeyboardHide ) Decode (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't decode replyKeyboardHide#a03e5b85 to nil" )
}
if err := b .ConsumeID (ReplyKeyboardHideTypeID ); err != nil {
return fmt .Errorf ("unable to decode replyKeyboardHide#a03e5b85: %w" , err )
}
return r .DecodeBare (b )
}
func (r *ReplyKeyboardHide ) DecodeBare (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't decode replyKeyboardHide#a03e5b85 to nil" )
}
{
if err := r .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode replyKeyboardHide#a03e5b85: field flags: %w" , err )
}
}
r .Selective = r .Flags .Has (2 )
return nil
}
func (r *ReplyKeyboardHide ) SetSelective (value bool ) {
if value {
r .Flags .Set (2 )
r .Selective = true
} else {
r .Flags .Unset (2 )
r .Selective = false
}
}
func (r *ReplyKeyboardHide ) GetSelective () (value bool ) {
if r == nil {
return
}
return r .Flags .Has (2 )
}
type ReplyKeyboardForceReply struct {
Flags bin .Fields
SingleUse bool
Selective bool
Placeholder string
}
const ReplyKeyboardForceReplyTypeID = 0x86b40b08
func (r ReplyKeyboardForceReply ) construct () ReplyMarkupClass { return &r }
var (
_ bin .Encoder = &ReplyKeyboardForceReply {}
_ bin .Decoder = &ReplyKeyboardForceReply {}
_ bin .BareEncoder = &ReplyKeyboardForceReply {}
_ bin .BareDecoder = &ReplyKeyboardForceReply {}
_ ReplyMarkupClass = &ReplyKeyboardForceReply {}
)
func (r *ReplyKeyboardForceReply ) Zero () bool {
if r == nil {
return true
}
if !(r .Flags .Zero ()) {
return false
}
if !(r .SingleUse == false ) {
return false
}
if !(r .Selective == false ) {
return false
}
if !(r .Placeholder == "" ) {
return false
}
return true
}
func (r *ReplyKeyboardForceReply ) String () string {
if r == nil {
return "ReplyKeyboardForceReply(nil)"
}
type Alias ReplyKeyboardForceReply
return fmt .Sprintf ("ReplyKeyboardForceReply%+v" , Alias (*r ))
}
func (r *ReplyKeyboardForceReply ) FillFrom (from interface {
GetSingleUse () (value bool )
GetSelective () (value bool )
GetPlaceholder () (value string , ok bool )
}) {
r .SingleUse = from .GetSingleUse ()
r .Selective = from .GetSelective ()
if val , ok := from .GetPlaceholder (); ok {
r .Placeholder = val
}
}
func (*ReplyKeyboardForceReply ) TypeID () uint32 {
return ReplyKeyboardForceReplyTypeID
}
func (*ReplyKeyboardForceReply ) TypeName () string {
return "replyKeyboardForceReply"
}
func (r *ReplyKeyboardForceReply ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "replyKeyboardForceReply" ,
ID : ReplyKeyboardForceReplyTypeID ,
}
if r == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "SingleUse" ,
SchemaName : "single_use" ,
Null : !r .Flags .Has (1 ),
},
{
Name : "Selective" ,
SchemaName : "selective" ,
Null : !r .Flags .Has (2 ),
},
{
Name : "Placeholder" ,
SchemaName : "placeholder" ,
Null : !r .Flags .Has (3 ),
},
}
return typ
}
func (r *ReplyKeyboardForceReply ) SetFlags () {
if !(r .SingleUse == false ) {
r .Flags .Set (1 )
}
if !(r .Selective == false ) {
r .Flags .Set (2 )
}
if !(r .Placeholder == "" ) {
r .Flags .Set (3 )
}
}
func (r *ReplyKeyboardForceReply ) Encode (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't encode replyKeyboardForceReply#86b40b08 as nil" )
}
b .PutID (ReplyKeyboardForceReplyTypeID )
return r .EncodeBare (b )
}
func (r *ReplyKeyboardForceReply ) EncodeBare (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't encode replyKeyboardForceReply#86b40b08 as nil" )
}
r .SetFlags ()
if err := r .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode replyKeyboardForceReply#86b40b08: field flags: %w" , err )
}
if r .Flags .Has (3 ) {
b .PutString (r .Placeholder )
}
return nil
}
func (r *ReplyKeyboardForceReply ) Decode (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't decode replyKeyboardForceReply#86b40b08 to nil" )
}
if err := b .ConsumeID (ReplyKeyboardForceReplyTypeID ); err != nil {
return fmt .Errorf ("unable to decode replyKeyboardForceReply#86b40b08: %w" , err )
}
return r .DecodeBare (b )
}
func (r *ReplyKeyboardForceReply ) DecodeBare (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't decode replyKeyboardForceReply#86b40b08 to nil" )
}
{
if err := r .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode replyKeyboardForceReply#86b40b08: field flags: %w" , err )
}
}
r .SingleUse = r .Flags .Has (1 )
r .Selective = r .Flags .Has (2 )
if r .Flags .Has (3 ) {
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode replyKeyboardForceReply#86b40b08: field placeholder: %w" , err )
}
r .Placeholder = value
}
return nil
}
func (r *ReplyKeyboardForceReply ) SetSingleUse (value bool ) {
if value {
r .Flags .Set (1 )
r .SingleUse = true
} else {
r .Flags .Unset (1 )
r .SingleUse = false
}
}
func (r *ReplyKeyboardForceReply ) GetSingleUse () (value bool ) {
if r == nil {
return
}
return r .Flags .Has (1 )
}
func (r *ReplyKeyboardForceReply ) SetSelective (value bool ) {
if value {
r .Flags .Set (2 )
r .Selective = true
} else {
r .Flags .Unset (2 )
r .Selective = false
}
}
func (r *ReplyKeyboardForceReply ) GetSelective () (value bool ) {
if r == nil {
return
}
return r .Flags .Has (2 )
}
func (r *ReplyKeyboardForceReply ) SetPlaceholder (value string ) {
r .Flags .Set (3 )
r .Placeholder = value
}
func (r *ReplyKeyboardForceReply ) GetPlaceholder () (value string , ok bool ) {
if r == nil {
return
}
if !r .Flags .Has (3 ) {
return value , false
}
return r .Placeholder , true
}
type ReplyKeyboardMarkup struct {
Flags bin .Fields
Resize bool
SingleUse bool
Selective bool
Persistent bool
Rows []KeyboardButtonRow
Placeholder string
}
const ReplyKeyboardMarkupTypeID = 0x85dd99d1
func (r ReplyKeyboardMarkup ) construct () ReplyMarkupClass { return &r }
var (
_ bin .Encoder = &ReplyKeyboardMarkup {}
_ bin .Decoder = &ReplyKeyboardMarkup {}
_ bin .BareEncoder = &ReplyKeyboardMarkup {}
_ bin .BareDecoder = &ReplyKeyboardMarkup {}
_ ReplyMarkupClass = &ReplyKeyboardMarkup {}
)
func (r *ReplyKeyboardMarkup ) Zero () bool {
if r == nil {
return true
}
if !(r .Flags .Zero ()) {
return false
}
if !(r .Resize == false ) {
return false
}
if !(r .SingleUse == false ) {
return false
}
if !(r .Selective == false ) {
return false
}
if !(r .Persistent == false ) {
return false
}
if !(r .Rows == nil ) {
return false
}
if !(r .Placeholder == "" ) {
return false
}
return true
}
func (r *ReplyKeyboardMarkup ) String () string {
if r == nil {
return "ReplyKeyboardMarkup(nil)"
}
type Alias ReplyKeyboardMarkup
return fmt .Sprintf ("ReplyKeyboardMarkup%+v" , Alias (*r ))
}
func (r *ReplyKeyboardMarkup ) FillFrom (from interface {
GetResize () (value bool )
GetSingleUse () (value bool )
GetSelective () (value bool )
GetPersistent () (value bool )
GetRows () (value []KeyboardButtonRow )
GetPlaceholder () (value string , ok bool )
}) {
r .Resize = from .GetResize ()
r .SingleUse = from .GetSingleUse ()
r .Selective = from .GetSelective ()
r .Persistent = from .GetPersistent ()
r .Rows = from .GetRows ()
if val , ok := from .GetPlaceholder (); ok {
r .Placeholder = val
}
}
func (*ReplyKeyboardMarkup ) TypeID () uint32 {
return ReplyKeyboardMarkupTypeID
}
func (*ReplyKeyboardMarkup ) TypeName () string {
return "replyKeyboardMarkup"
}
func (r *ReplyKeyboardMarkup ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "replyKeyboardMarkup" ,
ID : ReplyKeyboardMarkupTypeID ,
}
if r == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Resize" ,
SchemaName : "resize" ,
Null : !r .Flags .Has (0 ),
},
{
Name : "SingleUse" ,
SchemaName : "single_use" ,
Null : !r .Flags .Has (1 ),
},
{
Name : "Selective" ,
SchemaName : "selective" ,
Null : !r .Flags .Has (2 ),
},
{
Name : "Persistent" ,
SchemaName : "persistent" ,
Null : !r .Flags .Has (4 ),
},
{
Name : "Rows" ,
SchemaName : "rows" ,
},
{
Name : "Placeholder" ,
SchemaName : "placeholder" ,
Null : !r .Flags .Has (3 ),
},
}
return typ
}
func (r *ReplyKeyboardMarkup ) SetFlags () {
if !(r .Resize == false ) {
r .Flags .Set (0 )
}
if !(r .SingleUse == false ) {
r .Flags .Set (1 )
}
if !(r .Selective == false ) {
r .Flags .Set (2 )
}
if !(r .Persistent == false ) {
r .Flags .Set (4 )
}
if !(r .Placeholder == "" ) {
r .Flags .Set (3 )
}
}
func (r *ReplyKeyboardMarkup ) Encode (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't encode replyKeyboardMarkup#85dd99d1 as nil" )
}
b .PutID (ReplyKeyboardMarkupTypeID )
return r .EncodeBare (b )
}
func (r *ReplyKeyboardMarkup ) EncodeBare (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't encode replyKeyboardMarkup#85dd99d1 as nil" )
}
r .SetFlags ()
if err := r .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode replyKeyboardMarkup#85dd99d1: field flags: %w" , err )
}
b .PutVectorHeader (len (r .Rows ))
for idx , v := range r .Rows {
if err := v .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode replyKeyboardMarkup#85dd99d1: field rows element with index %d: %w" , idx , err )
}
}
if r .Flags .Has (3 ) {
b .PutString (r .Placeholder )
}
return nil
}
func (r *ReplyKeyboardMarkup ) Decode (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't decode replyKeyboardMarkup#85dd99d1 to nil" )
}
if err := b .ConsumeID (ReplyKeyboardMarkupTypeID ); err != nil {
return fmt .Errorf ("unable to decode replyKeyboardMarkup#85dd99d1: %w" , err )
}
return r .DecodeBare (b )
}
func (r *ReplyKeyboardMarkup ) DecodeBare (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't decode replyKeyboardMarkup#85dd99d1 to nil" )
}
{
if err := r .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode replyKeyboardMarkup#85dd99d1: field flags: %w" , err )
}
}
r .Resize = r .Flags .Has (0 )
r .SingleUse = r .Flags .Has (1 )
r .Selective = r .Flags .Has (2 )
r .Persistent = r .Flags .Has (4 )
{
headerLen , err := b .VectorHeader ()
if err != nil {
return fmt .Errorf ("unable to decode replyKeyboardMarkup#85dd99d1: field rows: %w" , err )
}
if headerLen > 0 {
r .Rows = make ([]KeyboardButtonRow , 0 , headerLen %bin .PreallocateLimit )
}
for idx := 0 ; idx < headerLen ; idx ++ {
var value KeyboardButtonRow
if err := value .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode replyKeyboardMarkup#85dd99d1: field rows: %w" , err )
}
r .Rows = append (r .Rows , value )
}
}
if r .Flags .Has (3 ) {
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode replyKeyboardMarkup#85dd99d1: field placeholder: %w" , err )
}
r .Placeholder = value
}
return nil
}
func (r *ReplyKeyboardMarkup ) SetResize (value bool ) {
if value {
r .Flags .Set (0 )
r .Resize = true
} else {
r .Flags .Unset (0 )
r .Resize = false
}
}
func (r *ReplyKeyboardMarkup ) GetResize () (value bool ) {
if r == nil {
return
}
return r .Flags .Has (0 )
}
func (r *ReplyKeyboardMarkup ) SetSingleUse (value bool ) {
if value {
r .Flags .Set (1 )
r .SingleUse = true
} else {
r .Flags .Unset (1 )
r .SingleUse = false
}
}
func (r *ReplyKeyboardMarkup ) GetSingleUse () (value bool ) {
if r == nil {
return
}
return r .Flags .Has (1 )
}
func (r *ReplyKeyboardMarkup ) SetSelective (value bool ) {
if value {
r .Flags .Set (2 )
r .Selective = true
} else {
r .Flags .Unset (2 )
r .Selective = false
}
}
func (r *ReplyKeyboardMarkup ) GetSelective () (value bool ) {
if r == nil {
return
}
return r .Flags .Has (2 )
}
func (r *ReplyKeyboardMarkup ) SetPersistent (value bool ) {
if value {
r .Flags .Set (4 )
r .Persistent = true
} else {
r .Flags .Unset (4 )
r .Persistent = false
}
}
func (r *ReplyKeyboardMarkup ) GetPersistent () (value bool ) {
if r == nil {
return
}
return r .Flags .Has (4 )
}
func (r *ReplyKeyboardMarkup ) GetRows () (value []KeyboardButtonRow ) {
if r == nil {
return
}
return r .Rows
}
func (r *ReplyKeyboardMarkup ) SetPlaceholder (value string ) {
r .Flags .Set (3 )
r .Placeholder = value
}
func (r *ReplyKeyboardMarkup ) GetPlaceholder () (value string , ok bool ) {
if r == nil {
return
}
if !r .Flags .Has (3 ) {
return value , false
}
return r .Placeholder , true
}
type ReplyInlineMarkup struct {
Rows []KeyboardButtonRow
}
const ReplyInlineMarkupTypeID = 0x48a30254
func (r ReplyInlineMarkup ) construct () ReplyMarkupClass { return &r }
var (
_ bin .Encoder = &ReplyInlineMarkup {}
_ bin .Decoder = &ReplyInlineMarkup {}
_ bin .BareEncoder = &ReplyInlineMarkup {}
_ bin .BareDecoder = &ReplyInlineMarkup {}
_ ReplyMarkupClass = &ReplyInlineMarkup {}
)
func (r *ReplyInlineMarkup ) Zero () bool {
if r == nil {
return true
}
if !(r .Rows == nil ) {
return false
}
return true
}
func (r *ReplyInlineMarkup ) String () string {
if r == nil {
return "ReplyInlineMarkup(nil)"
}
type Alias ReplyInlineMarkup
return fmt .Sprintf ("ReplyInlineMarkup%+v" , Alias (*r ))
}
func (r *ReplyInlineMarkup ) FillFrom (from interface {
GetRows () (value []KeyboardButtonRow )
}) {
r .Rows = from .GetRows ()
}
func (*ReplyInlineMarkup ) TypeID () uint32 {
return ReplyInlineMarkupTypeID
}
func (*ReplyInlineMarkup ) TypeName () string {
return "replyInlineMarkup"
}
func (r *ReplyInlineMarkup ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "replyInlineMarkup" ,
ID : ReplyInlineMarkupTypeID ,
}
if r == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Rows" ,
SchemaName : "rows" ,
},
}
return typ
}
func (r *ReplyInlineMarkup ) Encode (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't encode replyInlineMarkup#48a30254 as nil" )
}
b .PutID (ReplyInlineMarkupTypeID )
return r .EncodeBare (b )
}
func (r *ReplyInlineMarkup ) EncodeBare (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't encode replyInlineMarkup#48a30254 as nil" )
}
b .PutVectorHeader (len (r .Rows ))
for idx , v := range r .Rows {
if err := v .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode replyInlineMarkup#48a30254: field rows element with index %d: %w" , idx , err )
}
}
return nil
}
func (r *ReplyInlineMarkup ) Decode (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't decode replyInlineMarkup#48a30254 to nil" )
}
if err := b .ConsumeID (ReplyInlineMarkupTypeID ); err != nil {
return fmt .Errorf ("unable to decode replyInlineMarkup#48a30254: %w" , err )
}
return r .DecodeBare (b )
}
func (r *ReplyInlineMarkup ) DecodeBare (b *bin .Buffer ) error {
if r == nil {
return fmt .Errorf ("can't decode replyInlineMarkup#48a30254 to nil" )
}
{
headerLen , err := b .VectorHeader ()
if err != nil {
return fmt .Errorf ("unable to decode replyInlineMarkup#48a30254: field rows: %w" , err )
}
if headerLen > 0 {
r .Rows = make ([]KeyboardButtonRow , 0 , headerLen %bin .PreallocateLimit )
}
for idx := 0 ; idx < headerLen ; idx ++ {
var value KeyboardButtonRow
if err := value .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode replyInlineMarkup#48a30254: field rows: %w" , err )
}
r .Rows = append (r .Rows , value )
}
}
return nil
}
func (r *ReplyInlineMarkup ) GetRows () (value []KeyboardButtonRow ) {
if r == nil {
return
}
return r .Rows
}
const ReplyMarkupClassName = "ReplyMarkup"
type ReplyMarkupClass interface {
bin .Encoder
bin .Decoder
bin .BareEncoder
bin .BareDecoder
construct () ReplyMarkupClass
TypeID () uint32
TypeName () string
String () string
Zero () bool
}
func DecodeReplyMarkup (buf *bin .Buffer ) (ReplyMarkupClass , error ) {
id , err := buf .PeekID ()
if err != nil {
return nil , err
}
switch id {
case ReplyKeyboardHideTypeID :
v := ReplyKeyboardHide {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ReplyMarkupClass: %w" , err )
}
return &v , nil
case ReplyKeyboardForceReplyTypeID :
v := ReplyKeyboardForceReply {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ReplyMarkupClass: %w" , err )
}
return &v , nil
case ReplyKeyboardMarkupTypeID :
v := ReplyKeyboardMarkup {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ReplyMarkupClass: %w" , err )
}
return &v , nil
case ReplyInlineMarkupTypeID :
v := ReplyInlineMarkup {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ReplyMarkupClass: %w" , err )
}
return &v , nil
default :
return nil , fmt .Errorf ("unable to decode ReplyMarkupClass: %w" , bin .NewUnexpectedID (id ))
}
}
type ReplyMarkupBox struct {
ReplyMarkup ReplyMarkupClass
}
func (b *ReplyMarkupBox ) Decode (buf *bin .Buffer ) error {
if b == nil {
return fmt .Errorf ("unable to decode ReplyMarkupBox to nil" )
}
v , err := DecodeReplyMarkup (buf )
if err != nil {
return fmt .Errorf ("unable to decode boxed value: %w" , err )
}
b .ReplyMarkup = v
return nil
}
func (b *ReplyMarkupBox ) Encode (buf *bin .Buffer ) error {
if b == nil || b .ReplyMarkup == nil {
return fmt .Errorf ("unable to encode ReplyMarkupClass as nil" )
}
return b .ReplyMarkup .Encode (buf )
}
The pages are generated with Golds v0.6.7 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds .