From 1413709e8ad4d1d1b55d533dbd8ebeb6e813fa52 Mon Sep 17 00:00:00 2001 From: Ilya Hontarau Date: Fri, 19 Jul 2024 13:20:44 +0200 Subject: [PATCH] fix: remove pointer to worker (#12) * fix: remove pointer to worker * fix: skip publish flag --- .github/workflows/test.yml | 2 +- internal/state.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54a916d..3af3d2a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,4 +40,4 @@ jobs: uses: goreleaser/goreleaser-action@v2 with: version: latest - args: --skip-publish --snapshot + args: --skip=publish --snapshot diff --git a/internal/state.go b/internal/state.go index fa90f82..f51d15a 100644 --- a/internal/state.go +++ b/internal/state.go @@ -14,11 +14,11 @@ type State struct { ASG *types.AutoScalingGroup inServiceInstanceIDs map[InstanceID]struct{} - workersByInstanceID map[InstanceID]*Worker + workersByInstanceID map[InstanceID]Worker } func NewState(workerPool *WorkerPool, asg *types.AutoScalingGroup) (*State, error) { - workersByInstanceID := make(map[InstanceID]*Worker) + workersByInstanceID := make(map[InstanceID]Worker) inServiceInstanceIDs := make(map[InstanceID]struct{}) // Validate the ASG. @@ -49,7 +49,7 @@ func NewState(workerPool *WorkerPool, asg *types.AutoScalingGroup) (*State, erro return nil, fmt.Errorf("incorrect worker ASG: %s", groupID) } - workersByInstanceID[instanceID] = &worker + workersByInstanceID[instanceID] = worker } for _, instance := range asg.Instances {