Go http POST file
<p>I'm really new in Go and I have to integrate <a href="https://developers.zamzar.com/docs" rel="nofollow noreferrer">Zamzar</a> in a Go microservice. I need to <code>POST</code> a file and a data type (string).</p>

<p>Doing a <code>curl</code> looks like this:</p>

<p><code>curl https://sandbox.zamzar.com/v1/jobs \
 -u user:pass \
 -X POST \
 -F "source_file=@/tmp/portrait.gif" \
 -F "target_format=png"
</code></p>

<p>This is what I have so far:</p>

<pre><code>client := &amp;http.Client{}

req, err := http.NewRequest("GET", "https://sandbox.zamzar.com/v1/jobs", nil)

req.SetBasicAuth("user", "pass")

resp, err := client.Do(req)

if err != nil {
  fmt.Printf("Error : %s", err)
} else {
  fmt.Println(resp)
}
</code></pre>

<p>How can I send the <code>target_format</code> as a string and <code>source_file</code> as a file? <strong>I already have the file (<code>[]byte</code>)</strong></p>