Label attributes in nested structs are ignored
Open
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 657
- Avg merge
- 20h 36m
- Merged PRs (30d)
- 6
Description
### Go code
```go
type WithTwoAttributesAndLabel struct {
Name string `hcl:"name,label"`
A string `hcl:"a,optional"`
B string `hcl:"b,optional"`
}
type blockWithEmbeddedStruct struct {
WithTwoAttributesAndLabel `hcl:",remain"`
}
type withNestedEmbeddedBlock struct {
Nested *blockWithEmbeddedStruct `hcl:"nested,block"`
}
```
### HCL Template
```hcl
nested "name" {
a = "value"
b = "value"
}
```
### Expected behavior
The `nested` struct should have it's Name filled out with the value `name`
### Actual behavior
The name label is ignored but all other fields work fine
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.