Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theodesp/go-dedupesort
A small function that takes an integer array, removes any duplicates and sorts the results
https://github.com/theodesp/go-dedupesort
go
Last synced: about 1 month ago
JSON representation
A small function that takes an integer array, removes any duplicates and sorts the results
- Host: GitHub
- URL: https://github.com/theodesp/go-dedupesort
- Owner: theodesp
- License: mit
- Created: 2016-08-24T13:59:27.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-09T08:44:50.000Z (about 6 years ago)
- Last Synced: 2024-10-02T06:21:01.748Z (about 2 months ago)
- Topics: go
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dedupesort
:wrench: A small function that takes an integer array
removes duplicates and sorts the results## Install
```console
go get github.com/theodesp/go-dedupesort/...
```## Example Usage
```code
package mainimport (
"fmt"
utils "github.com/theodesp/go-dedupesort"
)func main() {
array := []int{7, 2, 4, 2, 1, 2}
fmt.Println(utils.DedupeSort(array)) // prints [1 2 4 7]
}
```## Example
Run the example inside the cmd folder
```console
cd cmd
go run main.go
```## License
MIT