listgen is a lock-free ordered linked list generator for Go.
First get listgen using go get github.com/PreetamJinka/listgen
.
$ listgen -h
Usage of ./listgen:
-cmp="": Comparison function body. The argument names are `a' and `b'.
-list-type="List": List type.
-out="": Output file. Leave blank for stdout.
-package="": Package name to use for the list.
-value-type="": Value type.
For example, the stringlist implementation is generated using:
$ listgen \
-package "stringlist" \
-list-type "StringList" \
-value-type "string" \
-cmp "if a < b {return -1}; if a > b {return 1}; return 0;" \
-out "stringlist/stringlist.go"
BSD (see LICENSE)