We are trying to implement a program in go which runs another go program from the specified path like
path, _ := exec.LookPath("program-name")
Next we have given a set of go commands to run the go program like
args := []string{"go", "install", "&&", "-port", "18000"}
We passed both path and args along with os.Environ()
to the syscall.Exec(). In order to run the project which we are calling has a check which tells us -port is required. As -port is not an executable command so it not taking the port value.
The requirement is when we type go install && project-name -port 19000 the program should run.
The query is there any way to achieve this and how can we pass the port value to get the desired outcome.