util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBinaryNotFound = fmt.Errorf("cannot find binary in PATH")
)
View Source
var ErrNotImplemented = fmt.Errorf("not implemented")

Functions

func CreateDirIfNotExists

func CreateDirIfNotExists(dir string) (err error)

func FindExecutable

func FindExecutable(name, dir, pathVar string) (string, error)

func GetHomeVar

func GetHomeVar(environ []string) string

func GetPathVar

func GetPathVar(environ []string) string

func HashStrings

func HashStrings(s []string) string

func LogWarnings

func LogWarnings(warns []Warning)

func Purge

func Purge(dir string) (err error)

func StringSortUniq

func StringSortUniq(s []string)

func VerifyPanic

func VerifyPanic(err error)

Types

type Selector

type Selector interface {
	MatchString(s string) bool
}

func CompileSelector

func CompileSelector(glob, homeDir string) (g Selector, err error)

type Warner

type Warner struct {
	Warns []Warning
}

func (*Warner) WarnError

func (w *Warner) WarnError(err error)

func (*Warner) Warnf

func (w *Warner) Warnf(format string, v ...interface{})

type Warning

type Warning struct {
	Warning string
}

Jump to

Keyboard shortcuts

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