mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
fix: print service endpoints for run service only when non-empty
This commit is contained in:
@@ -148,11 +148,14 @@ func run(ctx context.Context, uncli *cli.CLI, opts runOptions) error {
|
|||||||
return fmt.Errorf("inspect service: %w", err)
|
return fmt.Errorf("inspect service: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
endpoints := svc.Endpoints()
|
||||||
|
if len(endpoints) > 0 {
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
fmt.Printf("%s endpoints:\n", svc.Name)
|
fmt.Printf("%s endpoints:\n", svc.Name)
|
||||||
for _, endpoint := range svc.Endpoints() {
|
for _, endpoint := range endpoints {
|
||||||
fmt.Printf(" • %s\n", endpoint)
|
fmt.Printf(" • %s\n", endpoint)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user