From d2fdcbc0d4f8b4c184ba2b1c3c4b00da3918521f Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Wed, 26 Mar 2025 17:28:58 -0400 Subject: Stylish `--help` + generate manpages (#27) * man page generation * generate VHS Gifs manually * goreleaser packages manpage --- internal/logging/logging.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'internal/logging/logging.go') diff --git a/internal/logging/logging.go b/internal/logging/logging.go index 71f0334..054b303 100644 --- a/internal/logging/logging.go +++ b/internal/logging/logging.go @@ -7,12 +7,6 @@ import ( "github.com/ChausseBenjamin/termpicker/internal/util" ) -type logSink struct{} - -func (l logSink) Write(p []byte) (n int, err error) { - return len(p), nil -} - func Setup(filepath string) *os.File { if filepath != "" { logFile, err := os.Create(filepath) @@ -28,7 +22,7 @@ func Setup(filepath string) *os.File { } else { // Since app is a TUI, logging to stdout/stderr would break the UI // So we disable it by default - handler := slog.NewJSONHandler(logSink{}, nil) + handler := DiscardHandler{} slog.SetDefault(slog.New(handler)) return nil } -- cgit v1.2.3