#!/usr/bin/env sh # ./doc.go ( cat <&1 | sed -e 's/^usage: */ /' -e 's/^ */ /' echo ./mox helpall 2>&1 cat <doc.go gofmt -w doc.go # ./config/doc.go ( cat <". Below are all examples included in mox. EOF for ex in $(./mox config example); do echo '# Example '$ex echo ./mox config example $ex | sed 's/^/ /' echo done cat <config/doc.go gofmt -w config/doc.go # ./webapi/doc.go ./webapi/gendoc.sh >webapi/doc.go gofmt -w webapi/doc.go