package  tgimport  (	"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  InputStorePaymentPurposeClassArray  []InputStorePaymentPurposeClass func  (s  InputStorePaymentPurposeClassArray ) Sort less  func (a , b  InputStorePaymentPurposeClass ) bool ) InputStorePaymentPurposeClassArray  {	sort .Slice (s , func (i , j  int ) bool  {		return  less (s [i ], s [j ])	})	return  s }func  (s  InputStorePaymentPurposeClassArray ) SortStable less  func (a , b  InputStorePaymentPurposeClass ) bool ) InputStorePaymentPurposeClassArray  {	sort .SliceStable (s , func (i , j  int ) bool  {		return  less (s [i ], s [j ])	})	return  s }func  (s  InputStorePaymentPurposeClassArray ) Retain keep  func (x  InputStorePaymentPurposeClass ) bool ) InputStorePaymentPurposeClassArray  {	n  := 0 	for  _ , x  := range  s  {		if  keep (x ) {			s [n ] = x 			n ++		}	}	s  = s [:n ]	return  s }func  (s  InputStorePaymentPurposeClassArray ) First v  InputStorePaymentPurposeClass , ok  bool ) {	if  len (s ) < 1  {		return 	}	return  s [0 ], true }func  (s  InputStorePaymentPurposeClassArray ) Last v  InputStorePaymentPurposeClass , ok  bool ) {	if  len (s ) < 1  {		return 	}	return  s [len (s )-1 ], true }func  (s  *InputStorePaymentPurposeClassArray ) PopFirst v  InputStorePaymentPurposeClass , ok  bool ) {	if  s  == nil  || len (*s ) < 1  {		return 	}	a  := *s 	v  = a [0 ]		copy (a [0 :], a [1 :])	var  zero  InputStorePaymentPurposeClass 	a [len (a )-1 ] = zero 	a  = a [:len (a )-1 ]	*s  = a 	return  v , true }func  (s  *InputStorePaymentPurposeClassArray ) Pop v  InputStorePaymentPurposeClass , ok  bool ) {	if  s  == nil  || len (*s ) < 1  {		return 	}	a  := *s 	v  = a [len (a )-1 ]	a  = a [:len (a )-1 ]	*s  = a 	return  v , true }func  (s  InputStorePaymentPurposeClassArray ) AsInputStorePaymentPremiumSubscription to  InputStorePaymentPremiumSubscriptionArray ) {	for  _ , elem  := range  s  {		value , ok  := elem .(*InputStorePaymentPremiumSubscription )		if  !ok  {			continue 		}		to  = append (to , *value )	}	return  to }func  (s  InputStorePaymentPurposeClassArray ) AsInputStorePaymentGiftPremium to  InputStorePaymentGiftPremiumArray ) {	for  _ , elem  := range  s  {		value , ok  := elem .(*InputStorePaymentGiftPremium )		if  !ok  {			continue 		}		to  = append (to , *value )	}	return  to }func  (s  InputStorePaymentPurposeClassArray ) AsInputStorePaymentPremiumGiftCode to  InputStorePaymentPremiumGiftCodeArray ) {	for  _ , elem  := range  s  {		value , ok  := elem .(*InputStorePaymentPremiumGiftCode )		if  !ok  {			continue 		}		to  = append (to , *value )	}	return  to }func  (s  InputStorePaymentPurposeClassArray ) AsInputStorePaymentPremiumGiveaway to  InputStorePaymentPremiumGiveawayArray ) {	for  _ , elem  := range  s  {		value , ok  := elem .(*InputStorePaymentPremiumGiveaway )		if  !ok  {			continue 		}		to  = append (to , *value )	}	return  to }type  InputStorePaymentPremiumSubscriptionArray  []InputStorePaymentPremiumSubscription func  (s  InputStorePaymentPremiumSubscriptionArray ) Sort less  func (a , b  InputStorePaymentPremiumSubscription ) bool ) InputStorePaymentPremiumSubscriptionArray  {	sort .Slice (s , func (i , j  int ) bool  {		return  less (s [i ], s [j ])	})	return  s }func  (s  InputStorePaymentPremiumSubscriptionArray ) SortStable less  func (a , b  InputStorePaymentPremiumSubscription ) bool ) InputStorePaymentPremiumSubscriptionArray  {	sort .SliceStable (s , func (i , j  int ) bool  {		return  less (s [i ], s [j ])	})	return  s }func  (s  InputStorePaymentPremiumSubscriptionArray ) Retain keep  func (x  InputStorePaymentPremiumSubscription ) bool ) InputStorePaymentPremiumSubscriptionArray  {	n  := 0 	for  _ , x  := range  s  {		if  keep (x ) {			s [n ] = x 			n ++		}	}	s  = s [:n ]	return  s }func  (s  InputStorePaymentPremiumSubscriptionArray ) First v  InputStorePaymentPremiumSubscription , ok  bool ) {	if  len (s ) < 1  {		return 	}	return  s [0 ], true }func  (s  InputStorePaymentPremiumSubscriptionArray ) Last v  InputStorePaymentPremiumSubscription , ok  bool ) {	if  len (s ) < 1  {		return 	}	return  s [len (s )-1 ], true }func  (s  *InputStorePaymentPremiumSubscriptionArray ) PopFirst v  InputStorePaymentPremiumSubscription , ok  bool ) {	if  s  == nil  || len (*s ) < 1  {		return 	}	a  := *s 	v  = a [0 ]		copy (a [0 :], a [1 :])	var  zero  InputStorePaymentPremiumSubscription 	a [len (a )-1 ] = zero 	a  = a [:len (a )-1 ]	*s  = a 	return  v , true }func  (s  *InputStorePaymentPremiumSubscriptionArray ) Pop v  InputStorePaymentPremiumSubscription , ok  bool ) {	if  s  == nil  || len (*s ) < 1  {		return 	}	a  := *s 	v  = a [len (a )-1 ]	a  = a [:len (a )-1 ]	*s  = a 	return  v , true }type  InputStorePaymentGiftPremiumArray  []InputStorePaymentGiftPremium func  (s  InputStorePaymentGiftPremiumArray ) Sort less  func (a , b  InputStorePaymentGiftPremium ) bool ) InputStorePaymentGiftPremiumArray  {	sort .Slice (s , func (i , j  int ) bool  {		return  less (s [i ], s [j ])	})	return  s }func  (s  InputStorePaymentGiftPremiumArray ) SortStable less  func (a , b  InputStorePaymentGiftPremium ) bool ) InputStorePaymentGiftPremiumArray  {	sort .SliceStable (s , func (i , j  int ) bool  {		return  less (s [i ], s [j ])	})	return  s }func  (s  InputStorePaymentGiftPremiumArray ) Retain keep  func (x  InputStorePaymentGiftPremium ) bool ) InputStorePaymentGiftPremiumArray  {	n  := 0 	for  _ , x  := range  s  {		if  keep (x ) {			s [n ] = x 			n ++		}	}	s  = s [:n ]	return  s }func  (s  InputStorePaymentGiftPremiumArray ) First v  InputStorePaymentGiftPremium , ok  bool ) {	if  len (s ) < 1  {		return 	}	return  s [0 ], true }func  (s  InputStorePaymentGiftPremiumArray ) Last v  InputStorePaymentGiftPremium , ok  bool ) {	if  len (s ) < 1  {		return 	}	return  s [len (s )-1 ], true }func  (s  *InputStorePaymentGiftPremiumArray ) PopFirst v  InputStorePaymentGiftPremium , ok  bool ) {	if  s  == nil  || len (*s ) < 1  {		return 	}	a  := *s 	v  = a [0 ]		copy (a [0 :], a [1 :])	var  zero  InputStorePaymentGiftPremium 	a [len (a )-1 ] = zero 	a  = a [:len (a )-1 ]	*s  = a 	return  v , true }func  (s  *InputStorePaymentGiftPremiumArray ) Pop v  InputStorePaymentGiftPremium , ok  bool ) {	if  s  == nil  || len (*s ) < 1  {		return 	}	a  := *s 	v  = a [len (a )-1 ]	a  = a [:len (a )-1 ]	*s  = a 	return  v , true }type  InputStorePaymentPremiumGiftCodeArray  []InputStorePaymentPremiumGiftCode func  (s  InputStorePaymentPremiumGiftCodeArray ) Sort less  func (a , b  InputStorePaymentPremiumGiftCode ) bool ) InputStorePaymentPremiumGiftCodeArray  {	sort .Slice (s , func (i , j  int ) bool  {		return  less (s [i ], s [j ])	})	return  s }func  (s  InputStorePaymentPremiumGiftCodeArray ) SortStable less  func (a , b  InputStorePaymentPremiumGiftCode ) bool ) InputStorePaymentPremiumGiftCodeArray  {	sort .SliceStable (s , func (i , j  int ) bool  {		return  less (s [i ], s [j ])	})	return  s }func  (s  InputStorePaymentPremiumGiftCodeArray ) Retain keep  func (x  InputStorePaymentPremiumGiftCode ) bool ) InputStorePaymentPremiumGiftCodeArray  {	n  := 0 	for  _ , x  := range  s  {		if  keep (x ) {			s [n ] = x 			n ++		}	}	s  = s [:n ]	return  s }func  (s  InputStorePaymentPremiumGiftCodeArray ) First v  InputStorePaymentPremiumGiftCode , ok  bool ) {	if  len (s ) < 1  {		return 	}	return  s [0 ], true }func  (s  InputStorePaymentPremiumGiftCodeArray ) Last v  InputStorePaymentPremiumGiftCode , ok  bool ) {	if  len (s ) < 1  {		return 	}	return  s [len (s )-1 ], true }func  (s  *InputStorePaymentPremiumGiftCodeArray ) PopFirst v  InputStorePaymentPremiumGiftCode , ok  bool ) {	if  s  == nil  || len (*s ) < 1  {		return 	}	a  := *s 	v  = a [0 ]		copy (a [0 :], a [1 :])	var  zero  InputStorePaymentPremiumGiftCode 	a [len (a )-1 ] = zero 	a  = a [:len (a )-1 ]	*s  = a 	return  v , true }func  (s  *InputStorePaymentPremiumGiftCodeArray ) Pop v  InputStorePaymentPremiumGiftCode , ok  bool ) {	if  s  == nil  || len (*s ) < 1  {		return 	}	a  := *s 	v  = a [len (a )-1 ]	a  = a [:len (a )-1 ]	*s  = a 	return  v , true }type  InputStorePaymentPremiumGiveawayArray  []InputStorePaymentPremiumGiveaway func  (s  InputStorePaymentPremiumGiveawayArray ) Sort less  func (a , b  InputStorePaymentPremiumGiveaway ) bool ) InputStorePaymentPremiumGiveawayArray  {	sort .Slice (s , func (i , j  int ) bool  {		return  less (s [i ], s [j ])	})	return  s }func  (s  InputStorePaymentPremiumGiveawayArray ) SortStable less  func (a , b  InputStorePaymentPremiumGiveaway ) bool ) InputStorePaymentPremiumGiveawayArray  {	sort .SliceStable (s , func (i , j  int ) bool  {		return  less (s [i ], s [j ])	})	return  s }func  (s  InputStorePaymentPremiumGiveawayArray ) Retain keep  func (x  InputStorePaymentPremiumGiveaway ) bool ) InputStorePaymentPremiumGiveawayArray  {	n  := 0 	for  _ , x  := range  s  {		if  keep (x ) {			s [n ] = x 			n ++		}	}	s  = s [:n ]	return  s }func  (s  InputStorePaymentPremiumGiveawayArray ) First v  InputStorePaymentPremiumGiveaway , ok  bool ) {	if  len (s ) < 1  {		return 	}	return  s [0 ], true }func  (s  InputStorePaymentPremiumGiveawayArray ) Last v  InputStorePaymentPremiumGiveaway , ok  bool ) {	if  len (s ) < 1  {		return 	}	return  s [len (s )-1 ], true }func  (s  *InputStorePaymentPremiumGiveawayArray ) PopFirst v  InputStorePaymentPremiumGiveaway , ok  bool ) {	if  s  == nil  || len (*s ) < 1  {		return 	}	a  := *s 	v  = a [0 ]		copy (a [0 :], a [1 :])	var  zero  InputStorePaymentPremiumGiveaway 	a [len (a )-1 ] = zero 	a  = a [:len (a )-1 ]	*s  = a 	return  v , true }func  (s  *InputStorePaymentPremiumGiveawayArray ) Pop v  InputStorePaymentPremiumGiveaway , ok  bool ) {	if  s  == nil  || len (*s ) < 1  {		return 	}	a  := *s 	v  = a [len (a )-1 ]	a  = a [:len (a )-1 ]	*s  = a 	return  v , true } 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 .