github.com/TaceyWong/ctools@v0.1.1-0.20201221084458-4d7a8190b2ac/pkg/osext/README.md (about)

     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  
     7  As of go1.8 the Executable function may be found in `os`. The Executable function
     8  in the std lib `os` package is used if available.
     9  
    10  There is sometimes utility in finding the current executable file
    11  that is running. This can be used for upgrading the current executable
    12  or finding resources located relative to the executable file. Both
    13  working directory and the os.Args[0] value are arbitrary and cannot
    14  be relied on; os.Args[0] can be "faked".
    15  
    16  Multi-platform and supports:
    17   * Linux
    18   * OS X
    19   * Windows
    20   * Plan 9
    21   * BSDs.