cugo
is a prototypical project to implement Unix/Linux core utilities
in the form of a multi-call binary, primarily using the Go standard
library. Each utility is written from scratch using only the reference
manuals for the target utility and the Go standard library. Third-party
code use by cugo
is intentionally rare, currently relying on the
following:
- hlfstr/flagger for the optional
command line interface that resides within the
cmd
folder. - x/sys for various system calls.
Please visit godoc for the
latest documentation, or the doc.go
files within most directories.
- See cmd/README for information on the command line
interface provided by
cugo
. - See src/README for information on how to import a single utility.
- See lib/README for information on the libraries
written for
cugo
.
This repository may have a somewhat odd structure, though it has made
the process of building cugo
or importing an individual utility into
external projects trivial. No Makefile
's or other tools needed.
$ git clone [email protected]:jcmdln/cugo.git
$ cd ./cugo
$ go run cugo.go
# OR
$ go build
$ go get -u github.com/jcmdln/cugo
If you want an example of importing a single utility into another
project, please see cugo-mkdir-example
which implements mkdir
using Go's flag
package.
If you would like to contribute a utility, improve documentation, or write tests please see the CONTRIBUTING file for more information.