Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
less/ | H | 29-Mar-2020 | - | 85 | 65 | |
.gitignore | H A D | 29-Mar-2020 | 266 | 25 | 19 | |
LICENSE | H A D | 29-Mar-2020 | 1.4 KiB | 29 | 22 | |
README.md | H A D | 29-Mar-2020 | 764 | 22 | 16 | |
bubble.go | H A D | 29-Mar-2020 | 500 | 26 | 19 | |
bubble_test.go | H A D | 29-Mar-2020 | 651 | 40 | 30 | |
go.mod | H A D | 29-Mar-2020 | 89 | 6 | 3 | |
go.sum | H A D | 29-Mar-2020 | 575 | 7 | 6 | |
sort.go | H A D | 29-Mar-2020 | 5.6 KiB | 236 | 179 | |
sort_test.go | H A D | 29-Mar-2020 | 5.8 KiB | 259 | 207 |
README.md
1# sort [![GoSearch](http://go-search.org/badge?id=github.com%2Fgolangplus%2Fsort)](http://go-search.org/view?id=github.com%2Fgolangplus%2Fsort) 2Plus to the standard `sort` package. 3 4[Godoc](http://godoc.org/github.com/golangplus/sort) 5 6## Featured 7```go 8// InterfaceStruct is a struct implementing sort.Interface given closures 9type InterfaceStruct struct {...} 10 11// SortF calls sort.Sort by closures. Since Interface.Len always returns a constant, 12// it is an int parameter rather than a closure here. 13func SortF(Len int, Less func(i, j int) bool, Swap func(i, j int)) {...} 14 15// The bubble sort algorithm. It is especially useful for almost sorted list. 16// Bubble sort is a stable sort algorithm. 17func Bubble(data sort.Interface) {...} 18``` 19 20## LICENSE 21BSD license 22