Re: [go-nuts] Re: Hi, someone may help me converting this python code to GO

2016-07-10 Thread EdgarAlejandro Vintimilla
you're right, thanks I still have to improve this code and keep learning GO On Sunday, July 10, 2016 at 11:38:33 PM UTC-5, kortschak wrote: > > It's worth returning the error from strconv.ParseUint in the general > case. > > On Sun, 2016-07-10 at 21:02 -0700, eav...@gmail.com wrote: > >

Re: [go-nuts] Re: Hi, someone may help me converting this python code to GO

2016-07-10 Thread Dan Kortschak
It's worth returning the error from strconv.ParseUint in the general case. On Sun, 2016-07-10 at 21:02 -0700, eavi...@gmail.com wrote: > Thanks every one > > finally did it > > https://play.golang.org/p/20KzDE_u2a > -- You received this message because you are subscribed to the Google

[go-nuts] Re: Hi, someone may help me converting this python code to GO

2016-07-10 Thread eavinti
Thanks every one finally did it https://play.golang.org/p/20KzDE_u2a - On Saturday, July 9, 2016 at 11:04:01 PM UTC-5, eav...@gmail.com wrote: > > def GetCrc16(strHexData): > crc16tab = ( > 0x, 0x1189, 0x2312, 0x329B, 0x4624, 0x57AD, 0x6536, 0x74BF, > 0x8C48,

[go-nuts] Re: Make a multi part request from a stringified body payload

2016-07-10 Thread Aashish Karki
You can store the individual parts separately (along with their type and names) in the db. You can later use https://golang.org/pkg/mime/multipart/#NewWriter to create a multipart request out of the individual parts. On Sunday, July 10, 2016 at 6:13:47 PM UTC-4, Mayank Jha wrote: > > I wish to

Re: [go-nuts] Go can't alloc custom objects from byte slice's memory address?

2016-07-10 Thread Ian Lance Taylor
On Sun, Jul 10, 2016 at 9:17 AM, wrote: > It is safe to assume that GC scanner will never go into maped by user > regions? I.e. we can safely use mmapped pools for small objects that > references only other objects from that pool? The GC will not look at memory that you

Re: [go-nuts] Go can't alloc custom objects from byte slice's memory address?

2016-07-10 Thread sphilippov
It is safe to assume that GC scanner will never go into maped by user regions? I.e. we can safely use mmapped pools for small objects that references only other objects from that pool? воскресенье, 10 июля 2016 г., 5:07:19 UTC+3 пользователь Ian Lance Taylor написал: > > On Fri, Jul 8, 2016 at

Re: [go-nuts] Re: Hi, someone may help me converting this python code to GO

2016-07-10 Thread Dan Kortschak
On Sun, 2016-07-10 at 15:34 -0700, eavi...@gmail.com wrote: > 1) it not return exactly what return the code in python The code I have on the playground gives the same return as your python code. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group.

Re: [go-nuts] Hi, someone may help me converting this python code to GO

2016-07-10 Thread Michael Jones
Dan, i was guessing that the code was specifying a 16 bit integer for the running crc. That's why i am curious. On Jul 10, 2016 2:42 PM, "Jesper Louis Andersen" < jesper.louis.ander...@gmail.com> wrote: > > On Sun, Jul 10, 2016 at 5:07 AM, wrote: > >> def

Re: [go-nuts] Hi, someone may help me converting this python code to GO

2016-07-10 Thread Jesper Louis Andersen
On Sun, Jul 10, 2016 at 5:07 AM, wrote: > def GetFormattedHex(intNum, lenOfHexString): > return format(intNum, "0" + str(lenOfHexString) + "x") > Where do you get stuck in the translation? It looks pretty straightforward. Build the table of constants, implement the loop in

[go-nuts] Re: Make a multi part request from a stringified body payload

2016-07-10 Thread Egon
Not quite sure what you mean by reconstructing the request. There is https://golang.org/pkg/mime/multipart/ for parsing MIME multipart. On Sunday, 10 July 2016 15:39:00 UTC+3, Mayank Jha wrote: > > Any clues people ? > > On Thursday, July 7, 2016 at 5:05:13 PM UTC+5:30, Mayank Jha wrote: >> >> I

[go-nuts] Re: Make a multi part request from a stringified body payload

2016-07-10 Thread Mayank Jha
Any clues people ? On Thursday, July 7, 2016 at 5:05:13 PM UTC+5:30, Mayank Jha wrote: > > I have the payload, > "--3c1e04950334427b > Content-Disposition: form-data; name="certificate"; filename="new-cert.pem" > Content-Type: application/octet-stream > > -BEGIN RSA

Re: [go-nuts] Re: Hi, someone may help me converting this python code to GO

2016-07-10 Thread Dan Kortschak
Not here. On Sun, 2016-07-10 at 10:04 +0100, Michael Jones wrote: > I get “030a1x” as the result of my Go port. Is that what you expected? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails

Re: [go-nuts] Re: Hi, someone may help me converting this python code to GO

2016-07-10 Thread Michael Jones
I get “030a1x” as the result of my Go port. Is that what you expected? —— Michael Jones michael.jo...@gmail.com On Sun, Jul 10, 2016 at 6:10 AM, Kevin Powick wrote: Glad to see you put some effort into it yourself. -- You received this message because you are subscribed to

[go-nuts] Re: Does http PATCH not read body data ?

2016-07-10 Thread Mayank Jha
Oops! I feel like banging my head in a stone wall. How silly of me! :P. Btw thanks! :) On Sunday, July 10, 2016 at 3:54:36 AM UTC+5:30, C Banning wrote: > > try: https://play.golang.org/p/2RDK8JVO_2 > > On Saturday, July 9, 2016 at 12:12:42 PM UTC-6, Mayank Jha wrote: >> >> I am using,