From 233448ee93aebd7d416693daf9446d16e66872e2 Mon Sep 17 00:00:00 2001 From: RalfHammer <119853077+RalfHammer@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:47:58 +0200 Subject: [PATCH] fix typo --- internal/cf/client.go | 4 ++-- internal/cf/space.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/cf/client.go b/internal/cf/client.go index 6ca06e73..0cdf1758 100644 --- a/internal/cf/client.go +++ b/internal/cf/client.go @@ -408,8 +408,8 @@ func (c *organizationClient) populateSpaces(ctx context.Context) error { waitGroup.Add(1) go func(cfSpace *cfresource.Space) { defer waitGroup.Done() - if binding, err := InitSpace(cfSpace, ""); err == nil { - c.resourceCache.addSpaceInCache(*cfSpace.Metadata.Labels[labelOwner], binding) + if space, err := c.InitSpace(cfSpace, ""); err == nil { + c.resourceCache.addSpaceInCache(*cfSpace.Metadata.Labels[labelOwner], space) } else { log.Printf("Error initializing space: %s", err) } diff --git a/internal/cf/space.go b/internal/cf/space.go index 9859d0fa..f8147a36 100644 --- a/internal/cf/space.go +++ b/internal/cf/space.go @@ -44,7 +44,7 @@ func (c *organizationClient) GetSpace(ctx context.Context, owner string) (*facad space := spaces[0] // TODO: add directly to cache - return InitSpace(space, owner) + return c.InitSpace(space, owner) } // Required parameters (may not be initial): name, owner, generation @@ -168,7 +168,7 @@ func (c *organizationClient) AddManager(ctx context.Context, guid string, userna } // InitSpace wraps cfclient.Space as a facade.Space -func InitSpace(space *cfresource.Space, owner string) (*facade.Space, error) { +func (c *organizationClient) InitSpace(space *cfresource.Space, owner string) (*facade.Space, error) { guid := space.GUID name := space.Name generation, err := strconv.ParseInt(*space.Metadata.Annotations[annotationGeneration], 10, 64)