Types []Course and Courses are distinct types. courses have type []Courses
because that's what the parameter to make is. Change it to Courses, ie.

courses := make(Courses, maxrow)

On Tue, Sep 20, 2016, 19:44 Arie van Wingerden <xapw...@gmail.com> wrote:

> Hi,
>
> Still a beginner ... first take at a bit more difficult thing.
>
> I cannot get this https://play.golang.org/p/qgBLH0r_vq to work.
>
> Compiler says:
> cannot use courses (type []Course) as type sort.Interface in argument to
> sort.Sort:
>         []Course does not implement sort.Interface (missing Len method)
>
> However, I thought I need the Len method for []Courses instead of []Course!
>
> Pleas help.
>
> TIA
>
> --
> 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.
>
-- 

-j

-- 
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.

Reply via email to