gosh

command module
v0.0.0-...-8bbfb0d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL