util

package
v0.2.48 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(msg string, err error)

Check reports the error fatally if it's non-nil.

func DropLeadingNumbers

func DropLeadingNumbers(s string) string

DropLeadingNumbers drops leading numbers and underscores.

func GetProcesssGroupID added in v0.2.2

func GetProcesssGroupID(pid int) (int, error)

GetProcesssGroupID purports to get a process group Id common to all subprocesses of its pid argument.

There should be a better way to do this.

Goal is to be able to support killing any subprocesses created by RunInSubShell. At the moment, its up to authors to clean up after themselves.

func Lissajous

func Lissajous(out io.Writer, size, cycles, nframes int)

Lissajous returns an image. image canvas covers [-size..+size] nframes is number of animation frames cycles is number of complete x oscillator revolutions

func SampleString

func SampleString(incoming string, max int) string

SampleString converts a long multi-line string to a short one-line sample.

func Spaces

func Spaces(n int) string

Spaces returns a string of length n with only spaces.

Types

This section is empty.

Jump to

Keyboard shortcuts

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