diff --git a/example/README.md b/example/README.md index d5ab108c..2afa951b 100644 --- a/example/README.md +++ b/example/README.md @@ -72,8 +72,7 @@ TDLib can be used from the Go programming language through the [JSON](https://gi Convenient Go wrappers already exist for our JSON interface. For example, take a look at [go-tdlib](https://github.com/zelenin/go-tdlib) or [go-tdlib](https://github.com/Arman92/go-tdlib), which provide a convenient TDLib client, a generator for TDLib API classes and contain many examples. -You can also see [go-tdjson](https://github.com/L11R/go-tdjson) for another example of TDLib JSON interface integration with Go and -[example/go](https://github.com/tdlib/td/tree/master/example/go/main.go) for a proof of concept example of using the TDLib JSON interface from Go. +You can also see [go-tdjson](https://github.com/L11R/go-tdjson) for another example of TDLib JSON interface integration with Go. ## Using TDLib in Java projects diff --git a/example/go/main.go b/example/go/main.go deleted file mode 100644 index 430e0670..00000000 --- a/example/go/main.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -// #cgo LDFLAGS: -ltdjson -// #include -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)) -}