From 70cb13534112fb60b6656bb543f0b580565461d7 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Mon, 3 Nov 2025 22:03:26 +0100 Subject: [PATCH] fix badge, check error --- README.md | 2 +- lib/printer.go | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d2e0ae6..ec47053 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Actions](https://codeberg.org/scip/tablizer/actions/workflows/ci.yaml/badge.svg)](https://codeberg.org/scip/tablizer/actions) +[![status-badge](https://ci.codeberg.org/api/badges/15519/status.svg)](https://ci.codeberg.org/repos/15519) [![License](https://img.shields.io/badge/license-GPL-blue.svg)](https://codeberg.org/scip/tablizer/blob/master/LICENSE) [![Go Report Card](https://goreportcard.com/badge/codeberg.org/scip/tablizer)](https://goreportcard.com/report/codeberg.org/scip/tablizer) diff --git a/lib/printer.go b/lib/printer.go index 576e22c..2aa6463 100644 --- a/lib/printer.go +++ b/lib/printer.go @@ -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) + } } /*