diff options
author | George Hazan <ghazan@miranda.im> | 2022-11-30 17:48:47 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-11-30 17:48:47 +0300 |
commit | 0ece30dc7c0e34b4c5911969b8fa99c33c6d023c (patch) | |
tree | 671325d3fec09b999411e4e3ab84ef8259261818 /protocols/Telegram/tdlib/td/example/go | |
parent | 46c53ffc6809c67e4607e99951a2846c382b63b2 (diff) |
Telegram: update for TDLIB
Diffstat (limited to 'protocols/Telegram/tdlib/td/example/go')
-rw-r--r-- | protocols/Telegram/tdlib/td/example/go/main.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/protocols/Telegram/tdlib/td/example/go/main.go b/protocols/Telegram/tdlib/td/example/go/main.go deleted file mode 100644 index 430e067019..0000000000 --- a/protocols/Telegram/tdlib/td/example/go/main.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -// #cgo LDFLAGS: -ltdjson -// #include <td/telegram/td_json_client.h> -import "C" -import ( - "log" - "unsafe" -) - -func td_send(client unsafe.Pointer, query *C.char) { - C.td_json_client_send(client, query) -} - -func td_receive(client unsafe.Pointer) string { - return C.GoString(C.td_json_client_receive(client, 1.0)) -} - -func main() { - var client unsafe.Pointer - client = C.td_json_client_create() - - query := C.CString(`{"@type": "getAuthorizationState"}`) - td_send(client, query) - log.Println(td_receive(client)) -} |