For sorting, use the sort completion template. The
.sort
template transforms array or slice expressions and prepends them with an applicable sort method
that is based on the element type. If the element type is a custom type, GoLand uses the
sort.Slice
method.