From f9cb140e957817a62bd58d3662133a0894335eca Mon Sep 17 00:00:00 2001 From: Kharec Date: Tue, 9 Dec 2025 22:06:12 +0100 Subject: [PATCH] clean: removed the obsolete functions outputMessage and outputError --- cmd/goyco/commands/common.go | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/cmd/goyco/commands/common.go b/cmd/goyco/commands/common.go index 8e6ca38..4b3e410 100644 --- a/cmd/goyco/commands/common.go +++ b/cmd/goyco/commands/common.go @@ -8,9 +8,10 @@ import ( "os" "sync" - "gorm.io/gorm" "goyco/internal/config" "goyco/internal/database" + + "gorm.io/gorm" ) var ErrHelpRequested = errors.New("help requested") @@ -118,26 +119,6 @@ func outputJSON(v interface{}) error { return encoder.Encode(v) } -func outputMessage(message string, args ...interface{}) { - if IsJSONOutput() { - outputJSON(map[string]interface{}{ - "message": fmt.Sprintf(message, args...), - }) - } else { - fmt.Printf(message+"\n", args...) - } -} - -func outputError(message string, args ...interface{}) { - if IsJSONOutput() { - outputJSON(map[string]interface{}{ - "error": fmt.Sprintf(message, args...), - }) - } else { - fmt.Fprintf(os.Stderr, message+"\n", args...) - } -} - func outputWarning(message string, args ...interface{}) { if IsJSONOutput() { outputJSON(map[string]interface{}{