I'm trying to execute a command using go.
executableCommand := strings.Split("git commit -m 'hello world'", " ")
executeCommand(executableCommand[0], executableCommand[1:]...)
cmd := exec.Command(command, args...)
But here is what I get
error: pathspec 'world"' did not match any file(s) known to git.
exit status 1
This is because -m gets 'hello only and not 'hello world' since the command line is split using " ".
Any idea to make it work?