// Copyright 2022 wanderer // SPDX-License-Identifier: GPL-3.0-or-later //go:build ignore // +build ignore package main import ( "log" "os" "text/template" "time" ) func main() { columns := []string{ "l", "c", "c", "c", "c", "c", } results := []float64{ 161.032187, 125.03484, 80321, 85.0362432, -4.466, 66.0008, } topics := []string{ "func name", "minS", "maxS", "meanS", "medianS", "stdDevS", } fName := "report.tex" paths := []string{ "report.tmpl", } f, err := os.Create(fName) if err != nil { log.Fatal(err) } defer f.Close() reportTemplate := template.Must(template.ParseFiles(paths...)) err = reportTemplate.Execute(f, struct { Timestamp time.Time Topics []string Results []float64 Columns []string }{ Timestamp: time.Now(), Topics: topics, Results: results, Columns: columns, }) if err != nil { log.Println(err) } }