summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/kardianos/osext/osext_windows.go
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-07-13 07:38:58 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-07-13 07:38:58 -0400
commit540ebbd74db3a39007a1176e7bba2e275c3adf03 (patch)
tree84d08a7db4031e53aad83632c045830f10a8cf32 /vendor/github.com/kardianos/osext/osext_windows.go
parentd2df385f41e5cba47c5138ce1b0c8458bebd45e1 (diff)
downloadchat-540ebbd74db3a39007a1176e7bba2e275c3adf03.tar.gz
chat-540ebbd74db3a39007a1176e7bba2e275c3adf03.tar.bz2
chat-540ebbd74db3a39007a1176e7bba2e275c3adf03.zip
SAML Unit Tests, Go Driver & Removed vendor dependency (#3532)
Diffstat (limited to 'vendor/github.com/kardianos/osext/osext_windows.go')
-rw-r--r--vendor/github.com/kardianos/osext/osext_windows.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/vendor/github.com/kardianos/osext/osext_windows.go b/vendor/github.com/kardianos/osext/osext_windows.go
deleted file mode 100644
index 72d282cf8..000000000
--- a/vendor/github.com/kardianos/osext/osext_windows.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package osext
-
-import (
- "syscall"
- "unicode/utf16"
- "unsafe"
-)
-
-var (
- kernel = syscall.MustLoadDLL("kernel32.dll")
- getModuleFileNameProc = kernel.MustFindProc("GetModuleFileNameW")
-)
-
-// GetModuleFileName() with hModule = NULL
-func executable() (exePath string, err error) {
- return getModuleFileName()
-}
-
-func getModuleFileName() (string, error) {
- var n uint32
- b := make([]uint16, syscall.MAX_PATH)
- size := uint32(len(b))
-
- r0, _, e1 := getModuleFileNameProc.Call(0, uintptr(unsafe.Pointer(&b[0])), uintptr(size))
- n = uint32(r0)
- if n == 0 {
- return "", e1
- }
- return string(utf16.Decode(b[0:n])), nil
-}