fix break from switch in loop

This commit is contained in:
James Bardin 2020-12-01 09:05:59 -05:00
parent 44ccb94e2e
commit ddb5b9ee53
1 changed files with 3 additions and 2 deletions

View File

@ -82,6 +82,7 @@ func parseModuleInstancePrefix(traversal hcl.Traversal) (ModuleInstance, hcl.Tra
var mi ModuleInstance
var diags tfdiags.Diagnostics
LOOP:
for len(remain) > 0 {
var next string
switch tt := remain[0].(type) {
@ -96,7 +97,7 @@ func parseModuleInstancePrefix(traversal hcl.Traversal) (ModuleInstance, hcl.Tra
Detail: "Module address prefix must be followed by dot and then a name.",
Subject: remain[0].SourceRange().Ptr(),
})
break
break LOOP
}
if next != "module" {
@ -129,7 +130,7 @@ func parseModuleInstancePrefix(traversal hcl.Traversal) (ModuleInstance, hcl.Tra
Detail: "Prefix \"module.\" must be followed by a module name.",
Subject: remain[0].SourceRange().Ptr(),
})
break
break LOOP
}
remain = remain[1:]
step := ModuleInstanceStep{