sortof provides implementations of peculiar carefully selected sorting algorithms as a:
- CLI tool for sorting input, line by line (similar to POSIX sort),
- Go module with functions for sorting slices (similar to slices.Sort()).
Implemented algorithms:
$ cat letters.txt
c
a
b
$ sortof bogo -t 10s letters.txt
a
b
c
Download latest stable release from GitHub .
You can also build it manually with commands: make && make build
.
Use make
(GNU or BSD):
make
- install dependenciesmake test
- runs testmake e2e
- runs e2e tests for CLImake check
- static code analysismake build
- compile binaries from latest commitmake dist
- compile binaries from latest commit for supported OSesmake clean
- removes compilation artifactsmake cli-release
- tag latest commit as a new release of CLImake module-release
- tag latest commit as a new release of Go modulemake info
- print system info (useful for debugging).
The repo contains CLI and Go module which can be developed with different pace. Commits with versions are tagged with:
vX.X.X
(semantic versioning) - versions of Go modulecli/vYYYY.0M.MICRO
(calendar versioning) - versions of command-line utility.
On modern Linuxes and OpenBSD, CLI application has restricted access to kernel calls with seccomp and pledge.