Documentation
¶
Index ¶
- type FileSorter
- func (f *FileSorter) SortByHeap(lines []string) []string
- func (f *FileSorter) SortByMerge(lines []string) []string
- func (f *FileSorter) SortByQuick(lines []string) []string
- func (f *FileSorter) SortByRadix(lines []string) []string
- func (f *FileSorter) SortByRandom(lines []string) []string
- func (f *FileSorter) SortFileByLines(algorithm SortAlgorithm) ([]string, error)
- func (f *FileSorter) SortFileByUniqueLines(algorithm SortAlgorithm) ([]string, error)
- type SortAlgorithm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileSorter ¶
func ProcessFileToSort ¶
func ProcessFileToSort(file *os.File) (*FileSorter, error)
func (*FileSorter) SortByHeap ¶
func (f *FileSorter) SortByHeap(lines []string) []string
func (*FileSorter) SortByMerge ¶
func (f *FileSorter) SortByMerge(lines []string) []string
func (*FileSorter) SortByQuick ¶
func (f *FileSorter) SortByQuick(lines []string) []string
func (*FileSorter) SortByRadix ¶
func (f *FileSorter) SortByRadix(lines []string) []string
func (*FileSorter) SortByRandom ¶
func (f *FileSorter) SortByRandom(lines []string) []string
func (*FileSorter) SortFileByLines ¶
func (f *FileSorter) SortFileByLines(algorithm SortAlgorithm) ([]string, error)
func (*FileSorter) SortFileByUniqueLines ¶
func (f *FileSorter) SortFileByUniqueLines(algorithm SortAlgorithm) ([]string, error)
type SortAlgorithm ¶
type SortAlgorithm string
const ( RadixSort SortAlgorithm = "radix" MergeSort SortAlgorithm = "merge" QuickSort SortAlgorithm = "quick" HeapSort SortAlgorithm = "heap" RandomSort SortAlgorithm = "random" )
Click to show internal directories.
Click to hide internal directories.