shell

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package shell provides helpers for executing shell commands and wrappers for popular commands (e.g., git).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(targetDir, repoURL string) error

Clone runs 'git clone' with the repoURL and clones the repo contents into targetDir. targetDir must be an empty directory.

func Commit

func Commit(targetDir, message string) ([]byte, error)

Commit runs `git commit -m message` and returns the output.

func Exec

func Exec(workingDir, name string, args ...string) ([]byte, error)

Exec executes the given command within workingDir and returns the stdout. If there is an error in starting the command or the command exits with non zero code, returns the stderr wrapped in Go error.

func Init

func Init(targetDir string, name string) error

Init initializes a git repo in the given directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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