INNER CODE UNIT · Go

WirteValidatorHTML

simagix/keyhole · comparator.go:373

func WirteValidatorHTML(stats ComparatorStats) error {
	var err error
	os.Mkdir(htmldir, 0755)
	ofile := fmt.Sprintf(`%v/keyhole-compare.html`, htmldir)
	i := 1
	for mdb.DoesFileExist(ofile) {
		ofile = fmt.Sprintf(`%v/keyhole.%d-compare.html`, htmldir, i)
		i++
	}
	var w *os.File
	if w, err = os.Create(ofile); err != nil {
		return err
	}
	templ, err := GetValidatorTemplate()
	templ.Execute(w, stats)
	fmt.Println("html report written to", ofile)
	return err
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…