vendor: update github.com/kardianos/osext
This adds support for some additional Go platforms.
This commit is contained in:
parent
7cec01a883
commit
98c8ac0862
|
@ -4,6 +4,9 @@
|
||||||
|
|
||||||
## Find the current Executable and ExecutableFolder.
|
## Find the current Executable and ExecutableFolder.
|
||||||
|
|
||||||
|
As of go1.8 the Executable function may be found in `os`. The Executable function
|
||||||
|
in the std lib `os` package is used if available.
|
||||||
|
|
||||||
There is sometimes utility in finding the current executable file
|
There is sometimes utility in finding the current executable file
|
||||||
that is running. This can be used for upgrading the current executable
|
that is running. This can be used for upgrading the current executable
|
||||||
or finding resources located relative to the executable file. Both
|
or finding resources located relative to the executable file. Both
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
//+build go1.8,!openbsd
|
||||||
|
|
||||||
|
package osext
|
||||||
|
|
||||||
|
import "os"
|
||||||
|
|
||||||
|
func executable() (string, error) {
|
||||||
|
return os.Executable()
|
||||||
|
}
|
|
@ -2,6 +2,8 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//+build !go1.8
|
||||||
|
|
||||||
package osext
|
package osext
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build linux netbsd solaris dragonfly
|
// +build !go1.8,android !go1.8,linux !go1.8,netbsd !go1.8,solaris !go1.8,dragonfly
|
||||||
|
|
||||||
package osext
|
package osext
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ import (
|
||||||
|
|
||||||
func executable() (string, error) {
|
func executable() (string, error) {
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "linux":
|
case "linux", "android":
|
||||||
const deletedTag = " (deleted)"
|
const deletedTag = " (deleted)"
|
||||||
execpath, err := os.Readlink("/proc/self/exe")
|
execpath, err := os.Readlink("/proc/self/exe")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build darwin freebsd openbsd
|
// +build !go1.8,darwin !go1.8,freebsd openbsd
|
||||||
|
|
||||||
package osext
|
package osext
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//+build !go1.8
|
||||||
|
|
||||||
package osext
|
package osext
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
Loading…
Reference in New Issue