func (c *Client) Destroy() {
	C.td_json_client_destroy(c.Client)
}
Destroys the TDLib client instance.
After this is called the client instance shouldn't be used anymore.
package tdjson
import "C"
import (
	"encoding/json"
	"errors"
	"fmt"
	"math/rand"
	"sync"
	"time"
	"unsafe"
)
type Update = map[string]interface{}
type Client struct {
	Client     unsafe.Pointer
	Updates    chan Update
	waiters    sync.Map
	parameters *options
}
func NewClient(params ...Option) *Client {
	rand.Seed(time.Now().UnixNano())
	client := Client{Client: C.td_json_client_create()}
	client.Updates = make(chan Update, 100)
	client.parameters = &options{
		systemLanguageCode: "en",
		systemVersion:      "Unknown",
		applicationVersion: "1.0",
		deviceModel:        "Unknown",
	}
	for _, option := range params {
		option(client.parameters)
	}
	go func() {
		for {
			update := client.Receive(10)
			if extra, hasExtra := update["@extra"].(string); hasExtra {
				if waiter, found := client.waiters.Load(extra); found {
					waiter.(chan Update) <- update
					close(waiter.(chan Update))
				}
			} else {
				if _, hasType := update["@type"]; hasType {
					client.Updates <- update
				}
			}
		}
	}()
	return &client
}