Use golang.org/x/sys/execabs

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass
2021-01-27 21:09:42 +00:00
parent a56a4c00dd
commit 92f6f9f973
185 changed files with 5376 additions and 1591 deletions

View File

@ -32,6 +32,8 @@ type DLLError struct {
func (e *DLLError) Error() string { return e.Msg }
func (e *DLLError) Unwrap() error { return e.Err }
// A DLL implements access to a single DLL.
type DLL struct {
Name string
@ -389,7 +391,6 @@ func loadLibraryEx(name string, system bool) (*DLL, error) {
var flags uintptr
if system {
if canDoSearchSystem32() {
const LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800
flags = LOAD_LIBRARY_SEARCH_SYSTEM32
} else if isBaseName(name) {
// WindowsXP or unpatched Windows machine