diff --git a/tools/testtool/bincache.go b/tools/testtool/bincache.go index 24ae2ca..aa60c01 100644 --- a/tools/testtool/bincache.go +++ b/tools/testtool/bincache.go @@ -10,6 +10,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "sync" ) @@ -107,5 +108,9 @@ func (c *ciBuildCache) GetBinary(importPath string) (string, error) { func RandomName() string { var raw [8]byte _, _ = rand.Read(raw[:]) - return hex.EncodeToString(raw[:]) + name := hex.EncodeToString(raw[:]) + if runtime.GOOS == "windows" { + name += ".exe" + } + return name }