mirror of
https://codeberg.org/scip/tablizer.git
synced 2025-12-16 20:20:57 +01:00
catch io error
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user