mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
refactor(logs): encapsulate printing errors in PrintEntry
This commit is contained in:
@@ -125,10 +125,6 @@ func runLogs(ctx context.Context, uncli *cli.CLI, units []string, opts logs.Opti
|
||||
|
||||
// Print merged logs.
|
||||
for entry := range stream {
|
||||
if entry.Err != nil {
|
||||
formatter.PrintError(entry)
|
||||
continue
|
||||
}
|
||||
formatter.PrintEntry(entry)
|
||||
}
|
||||
|
||||
|
||||
@@ -180,10 +180,6 @@ func runLogs(ctx context.Context, uncli *cli.CLI, args []string, opts logs.Optio
|
||||
|
||||
// Print merged logs.
|
||||
for entry := range stream {
|
||||
if entry.Err != nil {
|
||||
formatter.PrintError(entry)
|
||||
continue
|
||||
}
|
||||
formatter.PrintEntry(entry)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user