Skip to content

Commit 502c1e9

Browse files
committed
comments
1 parent b116780 commit 502c1e9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/proto5server/server_listresource_tfprotov5_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) HashiCorp, Inc.
2+
// SPDX-License-Identifier: MPL-2.0
3+
14
package proto5server
25

36
import (
@@ -69,6 +72,9 @@ func listFunc(ctx context.Context, req list.ListRequest, stream *list.ListResult
6972
displayName := "I am Groot"
7073

7174
// Mimic SDK GRPCProviderServer.ReadResource ResourceData -> MsgPack
75+
// All this logic belongs in an "adapter" concern
76+
//
77+
// e.g. NewProtoV5ListResult(data *ResourceData, displayName string, diag sdkdiag.Diagnostics)
7278
state := d.State()
7379
if state == nil {
7480
push(diagnosticResult("Expected state to be non-nil"))

0 commit comments

Comments
 (0)