1 // Copyright 2016 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 // Executable returns the path name for the executable that started
8 // the current process. There is no guarantee that the path is still
9 // pointing to the correct executable. If a symlink was used to start
10 // the process, depending on the operating system, the result might
11 // be the symlink or the path it pointed to. If a stable result is
12 // needed, path/filepath.EvalSymlinks might help.
14 // Executable returns an absolute path unless an error occurred.
16 // The main use case is finding resources located relative to an
18 func Executable() (string, error) {