func CreateReport(w io.Writer, build *cbpb.Build) error {
	tmpl, err := htemplate.New("").Parse(strings.TrimSpace(reportTemplate))
	if err != nil {
		return err
	}

	const timeFmt = time.RFC1123Z // "Mon, 02 Jan 2006 15:04:05 -0700"
	start := build.StartTime.AsTime()
	end := build.FinishTime.AsTime()
	tdata := struct {
		Status   string
		Start    string
		End      string
		Duration string
	}{
		Status:   build.Status.String(),
		Start:    start.UTC().Format(timeFmt),
		End:      end.UTC().Format(timeFmt),
		Duration: formatDuration(end.Sub(start)),
	}
	return tmpl.Execute(w, tdata)
}
// CreateReport writes an HTML document with build's status and timing information to w.
CreateReport writes an HTML document with build's status and timing information to w.
// CreateReport writes an HTML document with build ' s status and timing information to w .
func CreateReport(w io.Writer, build *cbpb.Build) error {
	tmpl, err := htemplate.New("").Parse(strings.TrimSpace(reportTemplate))
	if err != nil {
		return err
	}
	const timeFmt = time.RFC1123Z 
	start := build.StartTime.AsTime()
	end := build.FinishTime.AsTime()
	tdata := struct {
		Status   string
		Start    string
		End      string
		Duration string
	}{
		Status:   build.Status.String(),
		Start:    start.UTC().Format(timeFmt),
		End:      end.UTC().Format(timeFmt),
		Duration: formatDuration(end.Sub(start)),
	}
	return tmpl.Execute(w, tdata)
}
func CreateReport ( w io . Writer , build * cbpb . Build ) error { tmpl , err := htemplate . New ( " " ) . Parse ( strings . TrimSpace ( reportTemplate ) ) if err != nil { return err } const timeFmt = time . RFC1123Z start := build . StartTime . AsTime ( ) end := build . FinishTime . AsTime ( ) tdata := struct { Status string Start string End string Duration string } { Status : build . Status . String ( ) , Start : start . UTC ( ) . Format ( timeFmt ) , End : end . UTC ( ) . Format ( timeFmt ) , Duration : formatDuration ( end . Sub ( start ) ) , } return tmpl . Execute ( w , tdata ) }
CreateReport writes an HTML document with build's status and timing information to w.
CreateReport writes an HTML document with build ' s status and timing information to w .
// "Mon, 02 Jan 2006 15:04:05 -0700"