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.
9 var executablePath
string // set by ../runtime/os_darwin.go
11 var initCwd
, initCwdErr
= Getwd()
13 func executable() (string, error
) {
16 return ep
, errors
.New("cannot find executable path")
19 if initCwdErr
!= nil {
22 if len(ep
) > 2 && ep
[0:2] == "./" {
26 ep
= initCwd
+ "/" + ep