which

package
v2.8.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2018 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBinaryNotFound    = errors.New("Requested binary was not found")
	ErrNoSearchSpecified = errors.New("You need to specify a binary to search")
)

Common named errors to match in programs using this library

Functions

func FindInDirectory

func FindInDirectory(binary, directory string) (bool, error)

FindInDirectory checks whether the specified file is present in the directory

func FindInPath

func FindInPath(binary string) (string, error)

FindInPath searches the specified binary in directories listed in $PATH and returns first match

Types

This section is empty.

Jump to

Keyboard shortcuts

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