Hello, as we know golang doesn’t support long Linux commands like service httpd restart
we have to run it via exec.Command(“service”,“https”,“restart”).Output()
What am thinking is to create an function called shell_exec() which takes an string argument and convert it to slices by space and we can run the command via exec.Command
Like shell_exec("service httpd restart")
then shell_exec function will convert sercice httpd restart to three different words servicehttpdrestart
and then we can able to send these words to exec.Command().Output()