Documentation ¶
Overview ¶
The gosh command runs shell commands embedded in Go source file comments.
Usage:
gosh [-w] [packages]
Gosh searches source files for comments that start with "// % " or "/* % ". It then runs the first line of the comment as a shell command, and replaces the remaining lines with the output of the command. It also replaces the "%" with "#". Shell commands are run concurrently.
For security, shell commands are disabled by default. The "//gosh:ok" directive enables commands, and the "//gosh:deny" directive disables them again. Both directives only apply to the end of their innermost scope.
Click to show internal directories.
Click to hide internal directories.