The sort.Interface Interface
Let’s learn about the sort.Interface interface’s functionality.
Definition of sort.Interface
The sort
package contains an interface named sort.Interface
that allows us to sort slices according to our needs and our data, provided that we implement sort.Interface
for the custom data types stored in our slices. The sort
package defines the sort.Interface
as follows:
Get hands-on with 1400+ tech skills courses.