catch io error

This commit is contained in:
2025-11-03 20:22:32 +01:00
parent 92d8017711
commit fe600ffb66

View File

@@ -26,11 +26,11 @@ import (
"strconv"
"strings"
"codeberg.org/scip/tablizer/cfg"
"github.com/gookit/color"
"github.com/olekukonko/tablewriter"
"github.com/olekukonko/tablewriter/renderer"
"github.com/olekukonko/tablewriter/tw"
"codeberg.org/scip/tablizer/cfg"
"gopkg.in/yaml.v3"
)
@@ -72,7 +72,10 @@ func printData(writer io.Writer, conf cfg.Config, data *Tabdata) {
}
func output(writer io.Writer, str string) {
fmt.Fprint(writer, str)
_, err := fmt.Fprint(writer, str)
if err != nil {
log.Fatalf("failed to print output: %s", err)
}
}
/*