Go Package sort: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 1: Line 1:
=External=
=External=
* https://pkg.go.dev/sort
* https://pkg.go.dev/sort
* https://pkg.go.dev/slices


=Internal=
=Internal=

Revision as of 17:09, 12 June 2024

External

Internal

Overview

The package provides primitives for sorting slices of ints and floats and user-defined collections. The sort package.

sort.Ints(slice)
sort.Float64s(slice)
sort.Strings(slice)


To sort slices, slices.Sort* is preferred.

Example

TODO Introducing Go page 83.