fork/exec . no such file or directory exit status 1

前端 未结 1 1767
Happy的楠姐
Happy的楠姐 2021-01-19 09:12

I am using Go 1.10.2 on Mac (darwin/amd64) and facing this error. It\'s saying no such file or directory.

Here\'s my code,

func loop1(gor_name string         


        
相关标签:
1条回答
  • 2021-01-19 09:49

    The function signature for exec.Command is:

    func Command(name string, args ...string) *Cmd
    

    where name is the name of the program and args are the arguments. Try this:

    cmd := exec.Command("./goreplay", "--input-file", gor_name, "--input-file-loop", "--output-http", ras_ip)
    
    0 讨论(0)
提交回复
热议问题