fix 1540 and experimental SSH server support

This commit is contained in:
Unknwon 2015-11-08 16:59:56 -05:00
parent b55499d039
commit 18c841050b
69 changed files with 171 additions and 15479 deletions

View file

@ -4,6 +4,12 @@
package base
import (
"os"
"os/exec"
"path/filepath"
)
const DOC_URL = "https://github.com/gogits/go-gogs-client/wiki"
type (
@ -11,3 +17,16 @@ type (
)
var GoGetMetas = make(map[string]bool)
// ExecPath returns the executable path.
func ExecPath() (string, error) {
file, err := exec.LookPath(os.Args[0])
if err != nil {
return "", err
}
p, err := filepath.Abs(file)
if err != nil {
return "", err
}
return p, nil
}