Source File
report.go
Belonging Package
go.pact.im/x/goupdate
package main
import (
)
type report struct {
Tests *testReport
State stateDiff
}
// generateReport generates the report for the requested flags.
func ( *flags, *report) error {
var bytes.Buffer
switch .outFormat {
case formatJSON:
:= json.NewEncoder(&)
if .outPath == "" {
.SetIndent("", "\t")
}
if := .Encode(); != nil {
return
}
case formatHTML:
if := generateHTML(&, ); != nil {
return
}
case formatText:
if := generateText(&, ); != nil {
return
}
}
:= bytes.TrimSpace(.Bytes())
if .outPath == "" {
if len() == 0 {
return nil
}
fmt.Fprintln(os.Stdout, string())
return nil
}
return os.WriteFile(.outPath, , 0o640)
}
The pages are generated with Golds v0.4.9. (GOOS=linux GOARCH=amd64)