Move third_party code under third_party/src so it can be used in $GOPATH.

This commit is contained in:
Joe Beda
2014-06-13 15:15:38 -07:00
parent a40529b379
commit d230625e1a
127 changed files with 7 additions and 7 deletions

View File

@@ -0,0 +1,20 @@
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package osext
import (
"syscall"
"os"
"strconv"
)
func executable() (string, error) {
f, err := os.Open("/proc/" + strconv.Itoa(os.Getpid()) + "/text")
if err != nil {
return "", err
}
defer f.Close()
return syscall.Fd2path(int(f.Fd()))
}