Documentation
¶
Overview ¶
path from https://github.com/therootcompany/pathman with some minor changes
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 ¶
- Constants
- 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 ¶
View Source
const ( HWND_BROADCAST = uintptr(0xffff) WM_SETTINGCHANGE = uintptr(0x001A) )
Variables ¶
View Source
var CommonExtensions = []string{"", ".exe", ".bat"}
Functions ¶
func GetExecutablePath ¶
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.