mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-24 16:10:46 -06:00
instances: staticcheck
This commit is contained in:
parent
d22e08bd32
commit
89a8624d8c
@ -433,17 +433,6 @@ func TestExpander(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func mustResourceAddr(str string) addrs.Resource {
|
|
||||||
addr, diags := addrs.ParseAbsResourceStr(str)
|
|
||||||
if diags.HasErrors() {
|
|
||||||
panic(fmt.Sprintf("invalid resource address: %s", diags.Err()))
|
|
||||||
}
|
|
||||||
if !addr.Module.IsRoot() {
|
|
||||||
panic("invalid resource address: includes module path")
|
|
||||||
}
|
|
||||||
return addr.Resource
|
|
||||||
}
|
|
||||||
|
|
||||||
func mustAbsResourceInstanceAddr(str string) addrs.AbsResourceInstance {
|
func mustAbsResourceInstanceAddr(str string) addrs.AbsResourceInstance {
|
||||||
addr, diags := addrs.ParseAbsResourceInstanceStr(str)
|
addr, diags := addrs.ParseAbsResourceInstanceStr(str)
|
||||||
if diags.HasErrors() {
|
if diags.HasErrors() {
|
||||||
|
Loading…
Reference in New Issue
Block a user