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