---
title: "Discussion on \"Go Cheatsheet - Sort\" | Hashnode"
description: "Discussion on \"Go Cheatsheet - Sort\". Sort\nSort Ints\nints := []int{3, 1, 4, 5, 2}\nsort.Ints(ints)\n// [1 2 3 4 5]\n\nSort String\nstrs := []string{\"bob\", \"clair\", \"alice\"}\nsort.Strings(strs)\n// [alice bob clair]\n\nSort in Reverse Order\nints := []int{3, 1, 4, 5, 2}\nsort.Sort(sort.Reverse(sort...."
url: "https://hashnode.com/posts/go-cheatsheet-sort/60809c49eb2bd30d2d22e331"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Go Cheatsheet - Sort](https://hn.0xbf.me/go-cheatsheet-sort?utm_source=hashnode&utm_medium=feed)

Sort Sort Ints ints := \[\]int{3, 1, 4, 5, 2} sort.Ints(ints) // \[1 2 3 4 5\] Sort String strs := \[\]string{"bob", "clair", "alice"} sort.Strings(strs) // \[alice bob clair\] Sort in Reverse Order ints := \[\]int{3, 1, 4, 5, 2} sort.Sort(sort.Reverse(sort....

Apr 21, 2021 · 2 min read · hn.0xbf.me  
Updated Apr 22, 2021  
Read the article

-   [#go](https://hashnode.com/tag/go)

## Written by

[0xBF](https://hashnode.com/@0xbf)

@0xbf

  
[View profile](https://hashnode.com/@0xbf)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
