Skip to content

macie/sortof

Repository files navigation

sortof

Go Reference OpenSSF Best Practices Quality check status Go Report Card

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:

Usage

$ cat letters.txt
c
a
b
$ sortof bogo -t 10s letters.txt
a
b
c

Installation

Download latest stable release from GitHub .

You can also build it manually with commands: make && make build.

Development

Use make (GNU or BSD):

  • make - install dependencies
  • make test - runs test
  • make e2e - runs e2e tests for CLI
  • make check - static code analysis
  • make build - compile binaries from latest commit
  • make dist - compile binaries from latest commit for supported OSes
  • make clean - removes compilation artifacts
  • make cli-release - tag latest commit as a new release of CLI
  • make module-release - tag latest commit as a new release of Go module
  • make info - print system info (useful for debugging).

Versioning

The repo contains CLI and Go module which can be developed with different pace. Commits with versions are tagged with:

Security hardening

On modern Linuxes and OpenBSD, CLI application has restricted access to kernel calls with seccomp and pledge.

License

MIT