Fixing commented code to refer to r.client rather than d.client in example_resource (#106) (#107)

This commit is contained in:
Benjamin Bennett 2022-12-15 14:53:01 +00:00 committed by GitHub
parent d6ceae2398
commit 06010dcd78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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