libgo: update to go1.9
[official-gcc.git] / libgo / go / os / executable.go
blob17eed10bc9f450560385cb48ce4860ff748d9ace
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.
5 package os
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
17 // executable.
19 // Executable is not supported on nacl.
20 func Executable() (string, error) {
21 return executable()