Go language provides inbuilt support implementation of basic constants and run-time reflection to operate sort package. Golang is the ability for functions to run independently of each other. With the help of this function we can easily sort integer and string by importing “sort” package. Basically, this will sort the Integer and Strings in Reverse order.
func Reverse(data Interface) Interface
Return Value: This function returns the value of IntSlice and StringSlice value.
Below examples illustrate the use of the above method in Golang:
Example For Integer Reverse Sort [80 70 50 20 10]
Example For String Reverse Sort [Rank India GFG Covid19 Amid]
- How to Sort a Slice of Strings in Golang?
- How to use for and foreach loop in Golang?
- Inverse functions and composition of functions
- Fruitful Functions and Void Functions in Julia
- How to use Ellipsis (...) in Golang?
- Golang Program to Use Field Tags in the Definition of Struct Type
- How to sort an Array in C# | Array.Sort() Method Set – 2
- How to Fix Race Condition using Atomic Functions in Golang?
- How to Reverse a String in Golang?
- Converting a string variable into Boolean, Integer or Float type in Golang
- How to Convert string to integer type in Golang?
- How to fetch an Integer variable as String in GoLang?
- How to sort a slice of Search in Golang?
- Copy an Array by Value and Reference into Another Array in Golang
- Strings in Golang
- Different ways to compare Strings in Golang
- Different ways to concatenate two strings in Golang
- strings.ContainsRune() Function in Golang with Examples
- strings.Compare() Function in Golang with Examples
- strings.Index() Function in Golang With Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.