Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small edit for style on a code comment #975

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading