Seems to me that you didn't understand how to use sort, it's a bit different from what you are used to in other languages. Take a look at the examples in the package docs https://golang.org/pkg/sort/#example_
On Tuesday, May 2, 2017 at 8:16:20 PM UTC+2, ramach...@qualtrics.com wrote: > > 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() method to type Duration? This post > seems to say no - > https://groups.google.com/forum/#!topic/golang-nuts/Hbxekd9g09c > > Thanks, > ram. > -- 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. For more options, visit https://groups.google.com/d/optout.