Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vooon committed May 28, 2024
1 parent 6eeff7c commit 79c61b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (g *InstanceGroup) Init(ctx context.Context, log hclog.Logger, settings pro
g.settings = settings
g.log = log.With("name", g.Name, "cloud", g.Cloud)

if _, err := g.getInstances(ctx, true); err != nil {
if _, err := g.getInstances(ctx); err != nil {
return provider.ProviderInfo{}, err
}

Expand All @@ -99,7 +99,7 @@ func (g *InstanceGroup) Init(ctx context.Context, log hclog.Logger, settings pro

func (g *InstanceGroup) Update(ctx context.Context, update func(instance string, state provider.State)) error {

instances, err := g.getInstances(ctx, false)
instances, err := g.getInstances(ctx)
if err != nil {
return err
}
Expand Down Expand Up @@ -179,10 +179,10 @@ func (g *InstanceGroup) Decrease(ctx context.Context, instances []string) (succe

g.log.Info("Decrease", "instances", instances)

return instances, err
return
}

func (g *InstanceGroup) getInstances(ctx context.Context, initial bool) ([]servers.Server, error) {
func (g *InstanceGroup) getInstances(ctx context.Context) ([]servers.Server, error) {
page, err := servers.List(g.computeClient, nil).AllPages(ctx)
if err != nil {
return nil, fmt.Errorf("Server listing error: %w", err)
Expand Down

0 comments on commit 79c61b6

Please sign in to comment.