[go-nuts] Golang resumable http upload

2018-02-26 Thread Sofiane Cherchalli
Hi! I'd like to implement an upload handler that is resumable in case of connection failure. Does net/http server support this use case? partial uploads and content range? Amazon and Google use their specific protocols. I found the Tusd protocol server implemented in Go, which I read has rec

Re: [go-nuts] Comparing structs

2017-12-24 Thread Sofiane Cherchalli
2017 at 11:18:09 PM UTC+1, Jan Mercl wrote: > > > On Sun, Dec 24, 2017 at 10:53 PM Sofiane Cherchalli > wrote: > > > Any hints on how to pass test? > > > > https://play.golang.org/p/ucDdBN_jzw7 > > I have no idea what should be the outcome, just fixed th

[go-nuts] Comparing structs

2017-12-24 Thread Sofiane Cherchalli
Any hints on how to pass test? https://play.golang.org/p/ucDdBN_jzw7 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com.

Re: [go-nuts] Re: Code Review - Applying functions on custom types

2017-08-17 Thread Sofiane Cherchalli
hod on it. > > BTW, when I first starting using Go, after working on scala for about 5 > years, it felt really wrong to have so many top level functions, but after > a while you see how there is nothing wrong with top level functions. > > Hope this helps. > > Thanks >

Re: [go-nuts] Re: Code Review - Applying functions on custom types

2017-08-10 Thread Sofiane Cherchalli
> > Hope it helps. > > > On Wednesday, July 26, 2017 at 10:09:07 AM UTC-4, Sofiane Cherchalli wrote: >> >> The schema is statically specified. The values always arrive in a defined >> order. Each value has a defined type. >> >> On Tuesday, July 25, 2017

Re: [go-nuts] Re: Code Review - Applying functions on custom types

2017-07-26 Thread Sofiane Cherchalli
The schema is statically specified. The values always arrive in a defined order. Each value has a defined type. On Tuesday, July 25, 2017 at 3:01:14 AM UTC+2, rog wrote: > > On 24 July 2017 at 23:21, Sofiane Cherchalli > wrote: > >> Yes, I'm trying to stream CSV value

[go-nuts] Re: Code Review - Applying functions on custom types

2017-07-24 Thread Sofiane Cherchalli
Hi Whom, Yes you could with columnar CSV and apply functions to column values, something basically similar to what does spark. In my case I receive streams of rows. Thx -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gro

Re: [go-nuts] Re: Code Review - Applying functions on custom types

2017-07-24 Thread Sofiane Cherchalli
Yes, I'm trying to stream CSV values encoded in strings. A schema defines a type of each value, so I have to parse values to verify they match the type. Once validation is done, I apply functions on each value. Working with basic types instead of custom types that wrap the basic types, sounds t

Re: [go-nuts] Re: Code Review - Applying functions on custom types

2017-07-23 Thread Sofiane Cherchalli
done ? > I would urge you to keep at it, try several variations, and in 2-3 months > tops you'll be able to naturally calibrate your perspective, and tell which > code feels idiomatic and which doesn't. > I guess yes I'm biased :) > > Cheers, > silviu > > O

Re: [go-nuts] Re: Code Review - Applying functions on custom types

2017-07-22 Thread Sofiane Cherchalli
e whole notion of Type seemed >> a bit redundant as CSV files have no notion of type, and it seems like >> you want to support custom types. The CSV prefix on the type names >> seemed unnecessary, as this would probably be in a package with >> some kind of csv-related

Re: [go-nuts] Re: Code Review - Applying functions on custom types

2017-07-21 Thread Sofiane Cherchalli
ype, and it seems like > you want to support custom types. The CSV prefix on the type names > seemed unnecessary, as this would probably be in a package with > some kind of csv-related name. > Is it possible to solve the problem without using type assertion? > > https://play.gol

Re: [go-nuts] Re: Code Review - Applying functions on custom types

2017-07-21 Thread Sofiane Cherchalli
ype, and it seems like > you want to support custom types. The CSV prefix on the type names > seemed unnecessary, as this would probably be in a package with > some kind of csv-related name. > Is it possible to solve the problem without using type assertion? > > https:/

[go-nuts] Re: Code Review - Applying functions on custom types

2017-07-20 Thread Sofiane Cherchalli
same type? Thanks On Thursday, July 20, 2017 at 5:09:40 AM UTC+2, Silviu Capota Mera wrote: > > Before: myfn := func(v CSVFloat) CSVFloat { return v } > > After: myfn := func(v Valuer) Valuer { return v } > > On Wednesday, 19 July 2017 16:48:07 UTC-4, Sofiane Cherchalli wrote: >

[go-nuts] Code Review - Applying functions on custom types

2017-07-19 Thread Sofiane Cherchalli
Hi! I'm a noob in Go and I need some guidance/help on this: https://play.golang.org/p/0TGzKiYQZn Basically I'm implementing a CSV parser, and applying transformations on column value. In last part of the code I'm trying to apply a function on CSVFloat type which satisfies Valuer interface, bu