summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/kardianos/osext/osext_procfs.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_procfs.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_procfs.go')
-rw-r--r--vendor/github.com/kardianos/osext/osext_procfs.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/vendor/github.com/kardianos/osext/osext_procfs.go b/vendor/github.com/kardianos/osext/osext_procfs.go
deleted file mode 100644
index d59847ee5..000000000
--- a/vendor/github.com/kardianos/osext/osext_procfs.go
+++ /dev/null
@@ -1,36 +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.
-
-// +build linux netbsd solaris dragonfly
-
-package osext
-
-import (
- "errors"
- "fmt"
- "os"
- "runtime"
- "strings"
-)
-
-func executable() (string, error) {
- switch runtime.GOOS {
- case "linux":
- const deletedTag = " (deleted)"
- execpath, err := os.Readlink("/proc/self/exe")
- if err != nil {
- return execpath, err
- }
- execpath = strings.TrimSuffix(execpath, deletedTag)
- execpath = strings.TrimPrefix(execpath, deletedTag)
- return execpath, nil
- case "netbsd":
- return os.Readlink("/proc/curproc/exe")
- case "dragonfly":
- return os.Readlink("/proc/curproc/file")
- case "solaris":
- return os.Readlink(fmt.Sprintf("/proc/%d/path/a.out", os.Getpid()))
- }
- return "", errors.New("ExecPath not implemented for " + runtime.GOOS)
-}