"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "internal/configs/configschema/decoder_spec.go" between
terraform-1.0.2.tar.gz and terraform-1.0.3.tar.gz

About: Terraform is a tool for building, changing, and versioning a datacenter infrastructure (written in Go).

decoder_spec.go  (terraform-1.0.2):decoder_spec.go  (terraform-1.0.3)
skipping to change at line 210 skipping to change at line 210
ret.Type = a.Type ret.Type = a.Type
ret.Required = a.Required ret.Required = a.Required
return ret return ret
} }
// listOptionalAttrsFromObject is a helper function which does *not* recurse // listOptionalAttrsFromObject is a helper function which does *not* recurse
// into NestedType Attributes, because the optional types for each of those will // into NestedType Attributes, because the optional types for each of those will
// belong to their own cty.Object definitions. It is used in other functions // belong to their own cty.Object definitions. It is used in other functions
// which themselves handle that recursion. // which themselves handle that recursion.
func listOptionalAttrsFromObject(o *Object) []string { func listOptionalAttrsFromObject(o *Object) []string {
var ret []string ret := make([]string, 0)
// This is unlikely to happen outside of tests.
if o == nil {
return ret
}
for name, attr := range o.Attributes { for name, attr := range o.Attributes {
if attr.Optional == true { if attr.Optional || attr.Computed {
ret = append(ret, name) ret = append(ret, name)
} }
} }
return ret return ret
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)