summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/kardianos/osext/osext_procfs.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-07-18 17:27:41 +0200
committerGitHub <noreply@github.com>2020-07-18 17:27:41 +0200
commit23d8742f0d95096b92f11729fb47f86ac3b68d43 (patch)
tree7b8acb02b051ae06e5454fda4a9d5118428fe016 /vendor/github.com/kardianos/osext/osext_procfs.go
parent3b6a8be07b9422714db30fb50977f342057febf3 (diff)
downloadmatterbridge-msglm-23d8742f0d95096b92f11729fb47f86ac3b68d43.tar.gz
matterbridge-msglm-23d8742f0d95096b92f11729fb47f86ac3b68d43.tar.bz2
matterbridge-msglm-23d8742f0d95096b92f11729fb47f86ac3b68d43.zip
Update dependencies for 1.18.0 release (#1175)
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 e1f16f88..00000000
--- 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 !go1.8,android !go1.8,linux !go1.8,netbsd !go1.8,solaris !go1.8,dragonfly
-
-package osext
-
-import (
- "errors"
- "fmt"
- "os"
- "runtime"
- "strings"
-)
-
-func executable() (string, error) {
- switch runtime.GOOS {
- case "linux", "android":
- 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)
-}