From a7f367cd71d0e84e7bb48a4d2f048a9270810780 Mon Sep 17 00:00:00 2001 From: Rodrigue Koffi Date: Thu, 4 May 2023 12:28:38 +0000 Subject: [PATCH] Avoid nil pointer defer (#11) --- internal/pkg/aws/aws.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/pkg/aws/aws.go b/internal/pkg/aws/aws.go index c08c00c..4299a98 100644 --- a/internal/pkg/aws/aws.go +++ b/internal/pkg/aws/aws.go @@ -62,10 +62,10 @@ func (a *AMG) ListWorkspaces() ([]Workspace, error) { for _, workspace := range response.Workspaces { w := Workspace{ - ID: *workspace.Id, - Name: *workspace.Name, - Version: *workspace.GrafanaVersion, - Endpoint: *workspace.Endpoint, + ID: aws.StringValue(workspace.Id), + Name: aws.StringValue(workspace.Name), + Version: aws.StringValue(workspace.GrafanaVersion), + Endpoint: aws.StringValue(workspace.Endpoint), } wx = append(wx, w) }