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,10 +148,13 @@ func run(ctx context.Context, uncli *cli.CLI, opts runOptions) error {
|
||||
return fmt.Errorf("inspect service: %w", err)
|
||||
}
|
||||
|
||||
fmt.Println()
|
||||
fmt.Printf("%s endpoints:\n", svc.Name)
|
||||
for _, endpoint := range svc.Endpoints() {
|
||||
fmt.Printf(" • %s\n", endpoint)
|
||||
endpoints := svc.Endpoints()
|
||||
if len(endpoints) > 0 {
|
||||
fmt.Println()
|
||||
fmt.Printf("%s endpoints:\n", svc.Name)
|
||||
for _, endpoint := range endpoints {
|
||||
fmt.Printf(" • %s\n", endpoint)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user