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 ':='
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.