title: variadic function, cannot pass parameters
body: <p>To call a dialog executable, which expects up to 3 buttons, I created this function:</p>
  <pre class="lang-golang prettyprint-override"><code>func Dialog(icon string, text string, buttons ...string) int {
      cmd := &amp;exec.Cmd{
          Path: dialogPath,
          Args: []string{
              dialogPath,
              icon,
              text,
              buttons...,
          },
          Stdout: os.Stdout,
          Stdin:  os.Stdin,
      }
      var waitStatus syscall.WaitStatus
      if err := cmd.Run(); err != nil {
          if exitError, ok := err.(*exec.ExitError); ok {
              waitStatus = exitError.Sys().(syscall.WaitStatus)
              return waitStatus.ExitStatus()
          }
      }
      return 0
  }
  </code></pre>
  <p>The issue is: This doesn't even compile because I do not understand how to pass the buttons to the Cmd. I thought unpacking would do the trick.</p>