[go-nuts] Re: Sorting an array of time.Duration

2017-05-02 Thread ramachandrang
Thank you JuciÊ Andrade & Roberto. On Tuesday, May 2, 2017 at 12:07:19 PM UTC-7, JuciÊ Andrade wrote: > > From Go v1.8 onwards there is yet another alternative: you can use the > sort package without implementing the Sort interface. > > Example: > > https://play.golang.org/p/YmiWpshLlX > --

[go-nuts] Sorting an array of time.Duration

2017-05-02 Thread ramachandrang
Hello, I have an array of time.Duration. I want to be able to sort this to do tp90, tp99 calculations. The sort.Sort() library function doesn't work on time.Duration. The error I get is *time.Duration does not implement sort.Interface (missing Len method)* Anyone know if I can add the Len()

Re: [go-nuts] newbie go question

2017-04-16 Thread ramachandrang
Thank you, Ian. I will give this a shot. I currently solved this by modifying the imported package to accept a *context.Context instead of golang.org/x/net/context.Context. On Friday, April 14, 2017 at 4:09:27 PM UTC-7, Ian Lance Taylor wrote: > > On Fri, Apr 14, 2017 at 3:34 PM, Ramachandran