From c145a6df98e05f89dd1b7e2fd73128bc98819278 Mon Sep 17 00:00:00 2001 From: hesto2 Date: Mon, 5 Aug 2024 14:44:28 -0600 Subject: [PATCH] format --- jupiterone/resource_dashboard.go | 4 ++-- jupiterone/resource_framework.go | 4 ++-- jupiterone/resource_frameworkitem.go | 4 ++-- jupiterone/resource_group.go | 4 ++-- jupiterone/resource_libraryitem.go | 4 ++-- jupiterone/resource_rule.go | 4 ++-- jupiterone/resource_widget.go | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/jupiterone/resource_dashboard.go b/jupiterone/resource_dashboard.go index f86ae6e2..0bf5e9fb 100644 --- a/jupiterone/resource_dashboard.go +++ b/jupiterone/resource_dashboard.go @@ -135,9 +135,9 @@ func (r *DashboardResource) Read(ctx context.Context, req resource.ReadRequest, dashboard, err := client.GetDashboard(ctx, r.qlient, data.Id.ValueString()) if err != nil { if strings.Contains(err.Error(), "not found") { - resp.State.RemoveResource(ctx) + resp.State.RemoveResource(ctx) } else { - resp.Diagnostics.AddError("failed to get dashboard", err.Error()) + resp.Diagnostics.AddError("failed to get dashboard", err.Error()) } return } diff --git a/jupiterone/resource_framework.go b/jupiterone/resource_framework.go index 603a3aa4..ec421ac5 100644 --- a/jupiterone/resource_framework.go +++ b/jupiterone/resource_framework.go @@ -223,9 +223,9 @@ func (r *ComplianceFrameworkResource) Read(ctx context.Context, req resource.Rea if r, err := client.GetComplianceFrameworkById(ctx, r.qlient, data.Id.ValueString()); err != nil { if err != nil { if strings.Contains(err.Error(), "Could not find") { - resp.State.RemoveResource(ctx) + resp.State.RemoveResource(ctx) } else { - resp.Diagnostics.AddError("failed to find framework", err.Error()) + resp.Diagnostics.AddError("failed to find framework", err.Error()) } } return diff --git a/jupiterone/resource_frameworkitem.go b/jupiterone/resource_frameworkitem.go index 8b632283..b0d1b12f 100644 --- a/jupiterone/resource_frameworkitem.go +++ b/jupiterone/resource_frameworkitem.go @@ -185,9 +185,9 @@ func (r *ComplianceFrameworkItemResource) Read(ctx context.Context, req resource if r, err := client.GetComplianceFrameworkItemById(ctx, r.qlient, data.Id.ValueString()); err != nil { if err != nil { if strings.Contains(err.Error(), "Could not find") { - resp.State.RemoveResource(ctx) + resp.State.RemoveResource(ctx) } else { - resp.Diagnostics.AddError("failed to find framework item", err.Error()) + resp.Diagnostics.AddError("failed to find framework item", err.Error()) } } return diff --git a/jupiterone/resource_group.go b/jupiterone/resource_group.go index 628bd0fc..5ff86081 100644 --- a/jupiterone/resource_group.go +++ b/jupiterone/resource_group.go @@ -177,9 +177,9 @@ func (r *ComplianceGroupResource) Read(ctx context.Context, req resource.ReadReq if err != nil { if err != nil { if strings.Contains(err.Error(), "Could not find") { - resp.State.RemoveResource(ctx) + resp.State.RemoveResource(ctx) } else { - resp.Diagnostics.AddError("failed to find group", err.Error()) + resp.Diagnostics.AddError("failed to find group", err.Error()) } } return diff --git a/jupiterone/resource_libraryitem.go b/jupiterone/resource_libraryitem.go index 3f239e85..9bd02184 100644 --- a/jupiterone/resource_libraryitem.go +++ b/jupiterone/resource_libraryitem.go @@ -177,9 +177,9 @@ func (r *ComplianceLibraryItemResource) Read(ctx context.Context, req resource.R if r, err := client.GetComplianceLibraryItemById(ctx, r.qlient, data.Id.ValueString()); err != nil { if err != nil { if strings.Contains(err.Error(), "Could not find") { - resp.State.RemoveResource(ctx) + resp.State.RemoveResource(ctx) } else { - resp.Diagnostics.AddError("failed to find library item", err.Error()) + resp.Diagnostics.AddError("failed to find library item", err.Error()) } } return diff --git a/jupiterone/resource_rule.go b/jupiterone/resource_rule.go index 159a990f..6ecd84d2 100644 --- a/jupiterone/resource_rule.go +++ b/jupiterone/resource_rule.go @@ -446,9 +446,9 @@ func (r *QuestionRuleResource) Read(ctx context.Context, req resource.ReadReques getResp, err := client.GetQuestionRuleInstance(ctx, r.qlient, oldData.Id.ValueString()) if err != nil { if strings.Contains(err.Error(), "does not exist") { - resp.State.RemoveResource(ctx) + resp.State.RemoveResource(ctx) } else { - resp.Diagnostics.AddError("failed to get rule", err.Error()) + resp.Diagnostics.AddError("failed to get rule", err.Error()) } return } diff --git a/jupiterone/resource_widget.go b/jupiterone/resource_widget.go index c2cbf94c..f6e949d6 100644 --- a/jupiterone/resource_widget.go +++ b/jupiterone/resource_widget.go @@ -152,9 +152,9 @@ func (r *WidgetResource) Read(ctx context.Context, req resource.ReadRequest, res response, err := client.GetWidget(ctx, r.qlient, data.DashboardId.ValueString(), "Account", data.Id.ValueString()) if err != nil { if strings.Contains(err.Error(), "not found") { - resp.State.RemoveResource(ctx) + resp.State.RemoveResource(ctx) } else { - resp.Diagnostics.AddError("failed to get widget", err.Error()) + resp.Diagnostics.AddError("failed to get widget", err.Error()) } return }