Skip to content

Commit ef63901

Browse files
committed
fixup! refactor
1 parent 2cb66a6 commit ef63901

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

internal/proto6server/server_listresource.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ func (s *Server) ListResource(ctx context.Context, proto6Req *tfprotov6.ListReso
1313
// proto6Stream := &tfprotov6.ListResourceServerStream{Results: tfprotov6.NoListResults}
1414
proto6Stream := &tfprotov6.ListResourceServerStream{Results: func(func(tfprotov6.ListResourceResult) bool) {}}
1515

16+
// TODO: extract fromproto6.ListRequest
17+
listResource, err := s.FrameworkServer.ListResourceOrError(ctx, proto6Req.TypeName)
18+
if err != nil {
19+
return proto6Stream, err
20+
}
21+
1622
// TODO: extract fromproto6.ListResourceConfig
1723
listResourceSchema, diags := s.FrameworkServer.ListResourceSchema(ctx, proto6Req.TypeName)
1824
if diags.HasError() {
@@ -24,12 +30,6 @@ func (s *Server) ListResource(ctx context.Context, proto6Req *tfprotov6.ListReso
2430
return proto6Stream, &ListResourceConfigError{TypeName: proto6Req.TypeName, Diagnostics: diags}
2531
}
2632

27-
// TODO: extract fromproto6.ListRequest
28-
listResource, err := s.FrameworkServer.ListResourceOrError(ctx, proto6Req.TypeName)
29-
if err != nil {
30-
return proto6Stream, err
31-
}
32-
3333
resourceSchema, diags := s.FrameworkServer.ResourceSchema(ctx, proto6Req.TypeName)
3434
if diags.HasError() {
3535
return proto6Stream, &ResourceSchemaNotFoundError{TypeName: proto6Req.TypeName}

0 commit comments

Comments
 (0)