Skip to content

Commit

Permalink
Small edit for style on a code comment (#975)
Browse files Browse the repository at this point in the history
* Make the code comment match the tutorial code comment

* Apply suggestions from code review

Co-authored-by: Austin Valle <austinvalle@gmail.com>

---------

Co-authored-by: Austin Valle <austinvalle@gmail.com>
  • Loading branch information
rkoron007 and austinvalle committed Apr 4, 2024
1 parent 484f311 commit 541a7cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions website/docs/plugin/framework/data-sources/configure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ type ThingDataSource struct {
}

func (d *ThingDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
// A nil check should always be performed when handling ProviderData as it
// is only set after the ConfigureProvider RPC has been called by Terraform.
// Always perform a nil check when handling ProviderData because Terraform
// sets that data after it calls the ConfigureProvider RPC.
if req.ProviderData == nil {
return
}
Expand Down
4 changes: 2 additions & 2 deletions website/docs/plugin/framework/resources/configure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ type ThingResource struct {
}

func (r *ThingResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) {
// A nil check should always be performed when handling ProviderData as it
// is only set after the ConfigureProvider RPC has been called by Terraform.
// Always perform a nil check when handling ProviderData because Terraform
// sets that data after it calls the ConfigureProvider RPC.
if req.ProviderData == nil {
return
}
Expand Down

0 comments on commit 541a7cb

Please sign in to comment.