2 Star 2 Fork 7

王布衣 / gox

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
application.go 351 Bytes
一键复制 编辑 原始数据 按行查看 历史
package runtime
import (
"os"
"path/filepath"
"sync"
)
var (
onceApp sync.Once
application = ""
)
func lazyLoadApplication() {
path, _ := os.Executable()
_, exec := filepath.Split(path)
application = exec
}
// ApplicationName 获取执行文件名
func ApplicationName() string {
onceApp.Do(lazyLoadApplication)
return application
}
Go
1
https://gitee.com/quant1x/gox.git
git@gitee.com:quant1x/gox.git
quant1x
gox
gox
v1.21.1

搜索帮助