lf/gen/docstring.sh

10 lines
438 B
Bash
Raw Normal View History

#!/bin/sh
# Generates `docstring.go` having `genDocString` variable with `go doc` output.
#
# This script is called in `doc.go` using `go generate` to embed the
# documentation inside the binary in order to show it on request with `-doc`
# command line flag. Thus the same documentation is used for online and
# terminal display.
2016-09-14 23:18:50 +00:00
echo "// DO NOT EDIT! (AUTO-GENERATED)\n\npackage main\n\nvar genDocString = \`$(go doc)\`" > docstring.go