1 Star 1 Fork 1

mjun1833 / delve

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
defaultexe.go 611 Bytes
一键复制 编辑 原始数据 按行查看 历史
majun 提交于 2023-08-24 16:44 . chore: update module name
package gobuild
import (
"io/ioutil"
"runtime"
"gitee.com/mjun1833/delve/pkg/logflags"
)
// DefaultDebugBinaryPath returns an unused file path in the current
// directory named 'name' followed by a random string
func DefaultDebugBinaryPath(name string) string {
pattern := name
if runtime.GOOS == "windows" {
pattern += "*.exe"
}
f, err := ioutil.TempFile(".", pattern)
if err != nil {
logflags.DebuggerLogger().Errorf("could not create temporary file for build output: %v", err)
if runtime.GOOS == "windows" {
return name + ".exe"
}
return name
}
r := f.Name()
f.Close()
return r
}
Go
1
https://gitee.com/mjun1833/delve.git
git@gitee.com:mjun1833/delve.git
mjun1833
delve
delve
v1.21.1

搜索帮助