Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfHammer committed Sep 27, 2024
1 parent f1d443c commit 233448e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/cf/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/cf/space.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 233448e

Please sign in to comment.