common

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2013 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpError

func DumpError(e error)

Prints an error to stdout in a "nice" way.

func FDumpError

func FDumpError(w io.Writer, e error)

Prints an error to a writer in a "nice" way.

func ForcedSymlink(oldname, newname string) error

Creates a symlink and deletes the file blocking the name of the symlink.

func GetAllPids

func GetAllPids() ([]int, error)

Returns a slice of all pids currently existing

func GetGoboxBinaryPath

func GetGoboxBinaryPath() (string, error)

func IsNumeric

func IsNumeric(s string) bool

func Parameterize

func Parameterize(line string) ([]string, error)

func PathExists

func PathExists(path string) bool

Checks if the given path exists i.e. if a os.Stat() succeeds

Types

type BufferedReader

type BufferedReader struct {
	*bufio.Reader
}

func NewBufferedReader

func NewBufferedReader(r io.Reader) *BufferedReader

func (*BufferedReader) ReadWholeLine

func (b *BufferedReader) ReadWholeLine() (line string, err error)

type Process

type Process struct {
	*os.Process
	Name     string
	Owner    int
	Cmdline  string
	State    string
	Parent   int
	MemUsage int
}

func GetProcessByPid

func GetProcessByPid(pid int) (*Process, error)

Jump to

Keyboard shortcuts

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