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{}{