Search⌘ K

Challenge: Sort People with Sorter Interface

Explore how to define a Person struct and a slice type Persons, then implement the Sorter interface to enable sorting. This lesson helps you understand interface implementation in Go by applying it to a sorting challenge, enhancing your grasp of interfaces and custom types.

We'll cover the following...

Problem statement

Define a struct Person with firstName and LastName, and a type ...