Skip to content

Commit 23e0799

Browse files
everpeaceembik
andcommitted
Update examples/cluster-inventory-api/main.go
Co-authored-by: Marvin Beckers <[email protected]>
1 parent 8280ec3 commit 23e0799

File tree

1 file changed

+1
-7
lines changed
  • examples/cluster-inventory-api

1 file changed

+1
-7
lines changed

examples/cluster-inventory-api/main.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"flag"
2323
"os"
2424

25-
"golang.org/x/sync/errgroup"
2625
clusterinventoryv1alpha1 "sigs.k8s.io/cluster-inventory-api/apis/v1alpha1"
2726
"sigs.k8s.io/cluster-inventory-api/pkg/credentials"
2827

@@ -141,12 +140,7 @@ func main() {
141140
os.Exit(1)
142141
}
143142

144-
// Starting everything.
145-
g, ctx := errgroup.WithContext(ctx)
146-
g.Go(func() error {
147-
return ignoreCanceled(mcMgr.Start(ctx))
148-
})
149-
if err := g.Wait(); err != nil {
143+
if err := mcMgr.Start(ctx); ignoreCanceled(err) != nil {
150144
entryLog.Error(err, "unable to start")
151145
os.Exit(1)
152146
}

0 commit comments

Comments
 (0)