Documentation ¶
Overview ¶
Package posix provides a few POSIX-based facilities for local and remote scripting
Index ¶
- func DownloadDir(remoteHost, remoteDir, sourceDir string) error
- func Exec(prog, dir string, stdin string, argv ...string) (stdout, stderr string, err error)
- func ForwardCombined(prefix string, stderr, stdout io.Reader)
- func ForwardStderr(prefix string, stderr io.Reader)
- func PrintScript(dir string, env Env, s string)
- func RemoteShell(remoteHost, remoteShellStdin string) (stdout, stderr string, err error)
- func Shell(shellStdin string) (stdout, stderr string, err error)
- func Shell2(env Env, dir, shellScript string, show bool) error
- func UploadDir(remoteHost, sourceDir, remoteDir string) error
- type Env
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadDir ¶
DownloadDir copies the contents of remoteDir on remoteHost to local directory sourceDir, using rsync over ssh.
func Exec ¶
Exec executes prog with working directory dir, flags argv, and standard input stdin. Exec returns the standard output and error streams as strings.
func ForwardCombined ¶
func ForwardStderr ¶
func PrintScript ¶
func RemoteShell ¶
RemoteShell executes sh on remoteHost via ssh and feeds it remoteShellStdin on the standard input.
Types ¶
Click to show internal directories.
Click to hide internal directories.