Skip to content

Commit

Permalink
Fixed some ioc container calls
Browse files Browse the repository at this point in the history
  • Loading branch information
wbreza committed Jul 22, 2024
1 parent bd40f15 commit 33bf5da
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions cli/azd/internal/vsrpc/environment_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ func (s *environmentService) GetEnvironmentsAsync(
envManager environment.Manager `container:"type"`
}

container, err := session.newContainer(rc)
serverContainer, err := session.newContainer(rc)
if err != nil {
return nil, err
}
if err := container.Fill(ctx, &c); err != nil {
if err := serverContainer.Fill(ctx, &c); err != nil {
return nil, err
}

Expand Down Expand Up @@ -82,11 +82,11 @@ func (s *environmentService) SetCurrentEnvironmentAsync(
azdCtx *azdcontext.AzdContext `container:"type"`
}

container, err := session.newContainer(rc)
serverContainer, err := session.newContainer(rc)
if err != nil {
return false, err
}
if err := container.Fill(ctx, &c); err != nil {
if err := serverContainer.Fill(ctx, &c); err != nil {
return false, err
}

Expand Down Expand Up @@ -155,7 +155,7 @@ func (s *environmentService) DeleteEnvironmentAsync(
}
})

if err := container.Fill(ctx, &c); err != nil {
if err := serverContainer.Fill(ctx, &c); err != nil {
return false, err
}

Expand Down
4 changes: 2 additions & 2 deletions cli/azd/internal/vsrpc/environment_service_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ func (s *environmentService) CreateEnvironmentAsync(
envManager environment.Manager `container:"type"`
}

container, err := session.newContainer(rc)
serverContainer, err := session.newContainer(rc)
if err != nil {
return false, err
}
if err := container.Fill(ctx, &c); err != nil {
if err := serverContainer.Fill(ctx, &c); err != nil {
return false, err
}

Expand Down
8 changes: 4 additions & 4 deletions cli/azd/internal/vsrpc/environment_service_load.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ func (s *environmentService) LoadEnvironmentAsync(
return nil, err
}

container, err := session.newContainer(rc)
serverContainer, err := session.newContainer(rc)
if err != nil {
return nil, err
}

return s.loadEnvironmentAsync(ctx, container, name, true)
return s.loadEnvironmentAsync(ctx, serverContainer, name, true)
}

func (s *environmentService) loadEnvironmentAsync(
ctx context.Context, container *serverContainer, name string, mustLoadServices bool,
ctx context.Context, serverContainer *serverContainer, name string, mustLoadServices bool,
) (*Environment, error) {
var c struct {
azdCtx *azdcontext.AzdContext `container:"type"`
Expand All @@ -69,7 +69,7 @@ func (s *environmentService) loadEnvironmentAsync(
dotnetImporter *project.DotNetImporter `container:"type"`
}

if err := container.Fill(ctx, &c); err != nil {
if err := serverContainer.Fill(ctx, &c); err != nil {
return nil, err
}

Expand Down
2 changes: 1 addition & 1 deletion cli/azd/internal/vsrpc/environment_service_refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (s *environmentService) refreshEnvironmentAsync(
}
})

if err := container.Fill(ctx, &c); err != nil {
if err := serverContainer.Fill(ctx, &c); err != nil {
return nil, err
}

Expand Down

0 comments on commit 33bf5da

Please sign in to comment.