title: Go Coverage over multiple package and Gitlab Coverage Badge
body: <p>I'm trying to display an accurate coverage badge for my gitlab project.</p>
  
  <p>Thing is I have several packages, in gitlab-ci.yml, I run</p>
  
  <pre><code>go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt
  </code></pre>
  
  <p>and my output is something like that:</p>
  
  <pre><code>$ go test -coverprofile=coverage.txt -covermode=atomic ./...
   ok     gitlab.com/[MASKED]/pam 10.333s coverage: 17.2% of statements
   ok     gitlab.com/[MASKED]/pam/acquisition 0.004s  coverage: 57.7% of statements
   ok     gitlab.com/[MASKED]/pam/acquisition/api 0.005s  coverage: 72.1% of statements
   ok     gitlab.com/[MASKED]/pam/acquisition/ftp 24.936s coverage: 73.1% of statements
   ok     gitlab.com/[MASKED]/pam/repartition 0.004s  coverage: 90.1% of statements
  </code></pre>
  
  <p>And my Test coverage parsing regex in Gitlab is:</p>
  
  <pre><code>^coverage:\s(\d+(?:\.\d+)?%)
  </code></pre>
  
  <p>If I check the .testCoverage, I get a lot of lines like that: </p>
  
  <pre><code> gitlab.com/[MASKED]/pam/repartition/repartition.go:54.33,56.5 1 1
  </code></pre>
  
  <p>So, it gives me a result of <code>90.1%</code> when it is only the coverage of the last package.</p>
  
  <p>How should I do it ?</p>