util

package
v0.0.0-...-16e729a Latest Latest
Warning

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

Go to latest
Published: May 21, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const BASH = "/bin/bash"

BASH is the path to the bash executable in Linux

View Source
const GHWorkingCommit = "0000000000000000000000000000000000000000"

GHWorkingCommit is for new branches on Github that have this a previous commit

Variables

This section is empty.

Functions

func CheckFileContents

func CheckFileContents(path, expect string) error

CheckFileContents reads a file and compares it to a string

func CheckForFile

func CheckForFile(path string) error

CheckForFile is self explanatory... checks for files

func CheckForProcess

func CheckForProcess(pid int, found chan bool, errChan chan error)

CheckForProcess checks for a running process using the ptrace syscall

func CommitToTree

func CommitToTree(repo *git.Repository, hash string) (*git.Tree, error)

CommitToTree takes a commit hash and fetches its git tree

func FmtClonePath

func FmtClonePath(clonePath *string) *string

FmtClonePath formats clonePath to a uniform format regardless of input

func FmtCommand

func FmtCommand(strCMD, path string) (*exec.Cmd, error)

FmtCommand formats a string to an exec'able command

func FmtDiffPath

func FmtDiffPath(clonePath, srvPath string) (newStr string)

FmtDiffPath formats a path for diffing

func TemplateCommits

func TemplateCommits(strCMD, lastCommit, currCommit string) (string, error)

TemplateCommits templates the commits hashes into commans

Types

type Commits

type Commits struct {
	Prev string
	Curr string
}

Commits is a struct for templating commits

Jump to

Keyboard shortcuts

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