Skip to content

Commit e9dd3e9

Browse files
committed
BlockName -> BlockType
1 parent 8f8f107 commit e9dd3e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tflint/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (c *Client) WalkResourceAttributes(resource, attributeName string, walker f
8383
// BlocksRequest is the interface used to communicate via RPC.
8484
type BlocksRequest struct {
8585
Resource string
86-
BlockName string
86+
BlockType string
8787
}
8888

8989
// BlocksResponse is the interface used to communicate via RPC.
@@ -107,11 +107,11 @@ type Block struct {
107107

108108
// WalkResourceBlocks queries the host process, receives a list of blocks that match the conditions,
109109
// and passes each to the walker function.
110-
func (c *Client) WalkResourceBlocks(resource, blockName string, walker func(*hcl.Block) error) error {
111-
log.Printf("[DEBUG] Walk `%s.*.%s` block", resource, blockName)
110+
func (c *Client) WalkResourceBlocks(resource, blockType string, walker func(*hcl.Block) error) error {
111+
log.Printf("[DEBUG] Walk `%s.*.%s` block", resource, blockType)
112112

113113
var response BlocksResponse
114-
if err := c.rpcClient.Call("Plugin.Blocks", BlocksRequest{Resource: resource, BlockName: blockName}, &response); err != nil {
114+
if err := c.rpcClient.Call("Plugin.Blocks", BlocksRequest{Resource: resource, BlockType: blockType}, &response); err != nil {
115115
return err
116116
}
117117
if response.Err != nil {

0 commit comments

Comments
 (0)