Source File
tl_double_gen.go
Belonging Package
github.com/gotd/td/tg
// Code generated by gotdgen, DO NOT EDIT.package tgimport ()// No-op definition for keeping imports.var (_ = bin.Buffer{}_ = context.Background()_ = fmt.Stringer(nil)_ = strings.Builder{}_ = errors.Is_ = multierr.AppendInto_ = sort.Ints_ = tdp.Format_ = tgerr.Error{}_ = tdjson.Encoder{})// Double represents TL type `double#2210c154`.//// See https://core.telegram.org/constructor/double for reference.type Double struct {}// DoubleTypeID is TL type id of Double.const DoubleTypeID = 0x2210c154// Ensuring interfaces in compile-time for Double.var (_ bin.Encoder = &Double{}_ bin.Decoder = &Double{}_ bin.BareEncoder = &Double{}_ bin.BareDecoder = &Double{})func ( *Double) () bool {if == nil {return true}return true}// String implements fmt.Stringer.func ( *Double) () string {if == nil {return "Double(nil)"}type Doublereturn fmt.Sprintf("Double%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*Double) () uint32 {return DoubleTypeID}// TypeName returns name of type in TL schema.func (*Double) () string {return "double"}// TypeInfo returns info about TL type.func ( *Double) () tdp.Type {:= tdp.Type{Name: "double",ID: DoubleTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{}return}// Encode implements bin.Encoder.func ( *Double) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode double#2210c154 as nil")}.PutID(DoubleTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *Double) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode double#2210c154 as nil")}return nil}// Decode implements bin.Decoder.func ( *Double) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode double#2210c154 to nil")}if := .ConsumeID(DoubleTypeID); != nil {return fmt.Errorf("unable to decode double#2210c154: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *Double) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode double#2210c154 to nil")}return nil}
![]() |
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. |