Remove go example in favor of third-party wrappers linked in example/README.md.

GitOrigin-RevId: e5df46f9c85c150afadb07b256ff4b2d3dd8f783
This commit is contained in:
levlam 2019-07-16 22:16:12 +03:00
parent 1b16d54c48
commit 7081198275
2 changed files with 1 additions and 28 deletions

View File

@ -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.
<a name="java"></a>
## Using TDLib in Java projects

View File

@ -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))
}