lookpath

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

README

lookpath

Provides wrapping functionality around os.exec.LookPath

Documentation

Overview

Package lookpath provides wrapping functionality around os.exec.LookPath

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasExecutable

func HasExecutable(executable string) bool

HasExecutable returns true if the given executable is in PATH.

func NeedCommands added in v0.24.0

func NeedCommands(commands []string) (missing []string, err error)

NeedCommands checks to see if the given executable, and sub command, are in PATH, erroring and returning the missing whole commands if not. For example, a command could be "docker compose", which should check for the "docker" executable, and then make sure "docker compose" exits with status 0.

func NeedExecutables

func NeedExecutables(executables []string) (missing []string, err error)

NeedExecutables checks to see if the given executables are in PATH, erroring and returning the missing executables if not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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