1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-06 15:27:20 +03:00
gitea/modules/base/base.go

31 lines
549 B
Go
Raw Normal View History

2014-03-06 11:21:44 +04:00
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package base
import (
"os"
"os/exec"
"path/filepath"
)
2015-08-29 06:49:59 +03:00
const DOC_URL = "https://github.com/gogits/go-gogs-client/wiki"
2014-11-15 01:11:30 +03:00
2014-03-06 11:21:44 +04:00
type (
2014-07-26 08:24:27 +04:00
TplName string
2014-03-06 11:21:44 +04:00
)
2014-04-13 09:57:42 +04:00
// 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
}