mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
refactor(logs): encapsulate printing errors in PrintEntry
This commit is contained in:
1 parent
19c13f6cd2
commit
5b5cd44d68
3 files changed
+8
-12
No files matched your search
@@ -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