Re: [go-nuts] How to convert C unsigned char * to golang string

2019-12-16 Thread Ian Lance Taylor
On Mon, Dec 16, 2019 at 8:51 PM wrote: > > I am using CGO to call a .so library written by C, and it has a param > unsigned char *result_buffer > > I use a C.uchar to receive its result, but how to convert it a Go string? You should receive the result in a *C.uchar. You can get a Go string by

[go-nuts] How to convert C unsigned char * to golang string

2019-12-16 Thread tyeenoprom
I am using CGO to call a .so library written by C, and it has a param unsigned char *result_buffer I use a C.uchar to receive its result, but how to convert it a Go string? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] Re: bufio.Reader.Buffered returns 0

2019-12-16 Thread Sam
Thanks Marvin, I think I understand now. Sorry Ian I didn't even notice, but still... I was using a net.Conn as the underlying reader. What I really needed was the Peek() function but the documentation for Buffered() made it seem more appropriate. I only needed to know the number of bytes received

[go-nuts] [ANN] go-jsonstruct: generate Go structs from multiple JSON objects

2019-12-16 Thread Tom Payne
Do you have a bunch of JSON objects with no schema that you want to idiomatically unmarshall in Go? Existing JSON-to-Go struct generators take one object as input. This one takes all the JSON objects you can throw at it, be they API responses, unstructured JSON column values in a database, or

[go-nuts] Re: TLS Cipher suites TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8

2019-12-16 Thread Brian Candler
There is always github.com/spacemonkeygo/openssl (even then, openssl deprecates non-recommended crypto, so you may need to build against an old version) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] Re: bufio.Reader.Buffered returns 0

2019-12-16 Thread Marvin Renich
* Ian Lance Taylor [191215 23:05]: > The Buffered method [snip] tells you how > many bytes you can Read without causing a call to the underlying > Reader. I think this would be a significant improvement over the current ambiguous documentation. It should adequately dispel any unrealistic

[go-nuts] Re: Kafka with ssl is not working

2019-12-16 Thread sounthar cs
Yes i am able to connect using that command. The server is working fine with python code. from kafka import KafkaProducer, KafkaConsumer from time import gmtime, strftime import io import io #print "Start 'test'" + strftime("%Y-%m-%d %H:%M:%S", gmtime()) broker_string =

[go-nuts] Re: Kafka with ssl is not working

2019-12-16 Thread Tamás Gulácsi
Are you sure that the Kafka instance you're connecting to does use TLS? openssl s_client -connect ...:9093 can connect? 2019. december 16., hétfő 7:52:31 UTC+1 időpontban sounthar cs a következőt írta: > > Hi All, > > I am trying to consume data from the existing kafka server. > > *I am able to