From 06010dcd7864357a0a1d3e2ff6f478c320951eef Mon Sep 17 00:00:00 2001 From: Benjamin Bennett Date: Thu, 15 Dec 2022 14:53:01 +0000 Subject: [PATCH] Fixing commented code to refer to r.client rather than d.client in example_resource (#106) (#107) --- internal/provider/example_resource.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/provider/example_resource.go b/internal/provider/example_resource.go index 0395c69..605900b 100644 --- a/internal/provider/example_resource.go +++ b/internal/provider/example_resource.go @@ -90,7 +90,7 @@ func (r *ExampleResource) Create(ctx context.Context, req resource.CreateRequest // If applicable, this is a great opportunity to initialize any necessary // provider client data and make a call using it. - // httpResp, err := d.client.Do(httpReq) + // httpResp, err := r.client.Do(httpReq) // if err != nil { // resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to create example, got error: %s", err)) // return @@ -120,7 +120,7 @@ func (r *ExampleResource) Read(ctx context.Context, req resource.ReadRequest, re // If applicable, this is a great opportunity to initialize any necessary // provider client data and make a call using it. - // httpResp, err := d.client.Do(httpReq) + // httpResp, err := r.client.Do(httpReq) // if err != nil { // resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to read example, got error: %s", err)) // return @@ -142,7 +142,7 @@ func (r *ExampleResource) Update(ctx context.Context, req resource.UpdateRequest // If applicable, this is a great opportunity to initialize any necessary // provider client data and make a call using it. - // httpResp, err := d.client.Do(httpReq) + // httpResp, err := r.client.Do(httpReq) // if err != nil { // resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to update example, got error: %s", err)) // return @@ -164,7 +164,7 @@ func (r *ExampleResource) Delete(ctx context.Context, req resource.DeleteRequest // If applicable, this is a great opportunity to initialize any necessary // provider client data and make a call using it. - // httpResp, err := d.client.Do(httpReq) + // httpResp, err := r.client.Do(httpReq) // if err != nil { // resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to delete example, got error: %s", err)) // return