func (runner *Runner) BuildReport(cc int, name string) *Report {
	runner.Logger.WithFields(log.Fields{
		"component": "runner",
		"phase":     "report",
	}).Info("building")
	report := Report{
		Name:   name,
		Status: "passed",
	}
	for len(report.Items) < cc {
		item := <-runner.Results
		for _, check := range item.Items {
			if check.Status != "passed" {
				item.Status = "failed"
			}
		}
		if item.Status != "passed" {
			report.Status = "failed"
		}
		report.Items = append(report.Items, item)
	}
	return &report
}
BuildReport given data returns a Report ready for writing
package internal
import (
	"fmt"
	"io/ioutil"
	log "github.com/sirupsen/logrus"
	"gopkg.in/yaml.v2"
)
type Item struct {
	Name    string                 `yaml:"name"`
	Status  string                 `yaml:"status"`
	Details map[string]interface{} `yaml:"details"`
}
type ReportItem struct {
	Name   string `yaml:"name"`
	Status string `yaml:"status"`
	Meta   struct {
		File string `yaml:"file"`
		Type string `yaml:"type"`
	} `yaml:"meta"`
	Items []Item `yaml:"items"`
}
type Report struct {
	Name   string `yaml:"name"`
	Status string `yaml:"status"`
	Meta   struct {
		Type string `yaml:"type"`
	} `yaml:"meta"`
	Items []ReportItem
}