X7ROOT File Manager
Current Path:
/opt/golang/1.17.2/src/cmd/cover/testdata
opt
/
golang
/
1.17.2
/
src
/
cmd
/
cover
/
testdata
/
📁
..
📄
directives.go
(502 B)
📁
html
📄
main.go
(2.99 KB)
📄
p.go
(450 B)
📄
profile.cov
(134 B)
📄
test.go
(4.94 KB)
📄
toolexec.go
(1.04 KB)
Editing: toolexec.go
// Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // The toolexec program is a helper program for cmd/cover tests. // It is used so that the go tool will call the newly built version // of the cover program, rather than the installed one. // // The tests arrange to run the go tool with the argument // -toolexec="/path/to/toolexec /path/to/testcover" // The go tool will invoke this program (compiled into /path/to/toolexec) // with the arguments shown above followed by the command to run. // This program will check whether it is expected to run the cover // program, and if so replace it with /path/to/testcover. package main import ( exec "internal/execabs" "os" "strings" ) func main() { if strings.HasSuffix(strings.TrimSuffix(os.Args[2], ".exe"), "cover") { os.Args[2] = os.Args[1] } cmd := exec.Command(os.Args[2], os.Args[3:]...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr if err := cmd.Run(); err != nil { os.Exit(1) } }
Upload File
Create Folder