Fix lint error (#7757)

This commit is contained in:
Justin Van Patten 2021-08-12 17:20:13 -07:00 committed by GitHub
parent 2b97340133
commit 1094d66659
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -888,10 +888,10 @@ func (mod *modContext) genNestedTypes(member interface{}, resourceType bool) []d
// the provided slice of properties in the schema.
func (mod *modContext) getProperties(properties []*schema.Property, lang string, input, nested, isProvider bool,
) []property {
return mod.getPropertiesWithIdPrefixAndExclude(properties, lang, input, nested, isProvider, "", nil)
return mod.getPropertiesWithIDPrefixAndExclude(properties, lang, input, nested, isProvider, "", nil)
}
func (mod *modContext) getPropertiesWithIdPrefixAndExclude(properties []*schema.Property, lang string, input, nested,
func (mod *modContext) getPropertiesWithIDPrefixAndExclude(properties []*schema.Property, lang string, input, nested,
isProvider bool, idPrefix string, exclude func(name string) bool) []property {
if len(properties) == 0 {
return nil

View file

@ -70,14 +70,14 @@ func (mod *modContext) genMethod(r *schema.Resource, m *schema.Method) methodDoc
exclude := func(name string) bool {
return name == "__self__"
}
props := mod.getPropertiesWithIdPrefixAndExclude(f.Inputs.Properties, lang, true, false, false,
props := mod.getPropertiesWithIDPrefixAndExclude(f.Inputs.Properties, lang, true, false, false,
fmt.Sprintf("%s_arg_", m.Name), exclude)
if len(props) > 0 {
inputProps[lang] = props
}
}
if f.Outputs != nil {
outputProps[lang] = mod.getPropertiesWithIdPrefixAndExclude(f.Outputs.Properties, lang, false, false, false,
outputProps[lang] = mod.getPropertiesWithIDPrefixAndExclude(f.Outputs.Properties, lang, false, false, false,
fmt.Sprintf("%s_result_", m.Name), nil)
}
}