util

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileTargetExps added in v0.7.0

func CompileTargetExps(strs []string) (exps []*regexp.Regexp, err error)

CompileTargetExps compiles the regular expression for each target

func DiffName

func DiffName(m manifest.Manifest) string

DiffName computes the filename for use with `DiffStr`

func DiffStr

func DiffStr(name, is, should string) (string, error)

Diff computes the differences between the strings `is` and `should` using the UNIX `diff(1)` utility.

func Diffstat

func Diffstat(d string) (*string, error)

Diffstat uses `diffstat(1)` utility to summarize a `diff(1)` output

func MustCompileTargetExps added in v0.7.0

func MustCompileTargetExps(strs ...string) (exps []*regexp.Regexp)

MustCompileTargetExps is like CompileTargetExps but panics on error Meant for static code

Types

type ErrBadTargetExp added in v0.7.0

type ErrBadTargetExp struct {
	// contains filtered or unexported fields
}

func (ErrBadTargetExp) Error added in v0.7.0

func (e ErrBadTargetExp) Error() string

type FilteredErr

type FilteredErr []*regexp.Regexp

FilteredErr is a filtered Stderr. If one of the regular expressions match, the current input is discarded.

func (FilteredErr) Write

func (r FilteredErr) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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