Documentation ¶
Overview ¶
Package path is useful for managing PATH as part of the Environment in the Windows HKey Local User registry. It returns an error for most operations on non-Windows systems.
Index ¶
- Variables
- func CheckOS() string
- func GetExecutablePath(path, toolName string) (string, bool)
- func GetOsData() string
- func IndexOf(paths []string, p string) (int, error)
- func IsSet(path string) bool
- func IsSubPath(parent, sub string) bool
- func NormalizePathEntry(pathentry string) (string, string, error)
- func SetENV(path string) error
- func UnsetENV(path string) error
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var CommonExtensions = []string{"", ".exe", ".bat"}
Functions ¶
func GetExecutablePath ¶ added in v0.0.4
func IndexOf ¶
IndexOf searches the given path list for first occurence of the given path entry and returns the index, or -1
func NormalizePathEntry ¶
NormalizePathEntry will return the given directory path relative from its absolute path to the %USERPROFILE% (home) directory.
Types ¶
Click to show internal directories.
Click to hide internal directories.