• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

LICENSEH A D22-Feb-20191.4 KiB

README.mdH A D22-Feb-2019729

go.modH A D22-Feb-201934

osext.goH A D22-Feb-2019873

osext_go18.goH A D22-Feb-2019115

osext_plan9.goH A D22-Feb-2019428

osext_procfs.goH A D22-Feb-2019945

osext_sysctl.goH A D22-Feb-20193.2 KiB

osext_test.goH A D22-Feb-20194.3 KiB

osext_windows.goH A D22-Feb-2019805

README.md

1### Extensions to the "os" package.
2
3[![GoDoc](https://godoc.org/github.com/kardianos/osext?status.svg)](https://godoc.org/github.com/kardianos/osext)
4
5## Find the current Executable and ExecutableFolder.
6
7As of go1.8 the Executable function may be found in `os`. The Executable function
8in the std lib `os` package is used if available.
9
10There is sometimes utility in finding the current executable file
11that is running. This can be used for upgrading the current executable
12or finding resources located relative to the executable file. Both
13working directory and the os.Args[0] value are arbitrary and cannot
14be relied on; os.Args[0] can be "faked".
15
16Multi-platform and supports:
17 * Linux
18 * OS X
19 * Windows
20 * Plan 9
21 * BSDs.
22