xexec

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCommandAvailable

func IsCommandAvailable(name string) bool

IsCommandAvailable checks if command is available on user's path.

func IsExec added in v0.26.0

func IsExec(binaryPath string) (bool, error)

IsExec checks if a file is executable by anyone.

func ResolveAbsPath added in v0.26.0

func ResolveAbsPath(filePath string) (path string, err error)

ResolveAbsPath searches for an executable file in the current working directory, the directories defined by the PATH environment variable and in the Go binary path. Once found returns the absolute path to the file.

func TryResolveAbsPath added in v0.26.0

func TryResolveAbsPath(filePath string) string

TryResolveAbsPath searches for an executable file in the current working directory, the directories defined by the PATH environment variable and in the Go binary path. Once found returns the absolute path to the file, or otherwise it returns the file path unmodified.

Types

This section is empty.

Jump to

Keyboard shortcuts

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