Skip to content

Keytrail shadowed in Walker #97

@GeorgeDuckman

Description

@GeorgeDuckman

Hi,

I might have found an issue, sorry if I'm wrong, but the variable keytrail in the function walkBlock is shadowed by the function argument.

func (w *Walker) walkBlock(body *hclwrite.Body, queries []query.Query, index int, keytrail []string) error {
	for _, block := range body.Blocks() {
		blockIndex := index
		if !queries[blockIndex].Match(block.Type()) {
			continue
		}

		blockIndex++
		keytrail := append(keytrail, block.Type()) // Right there, should be '=' not ':='

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions