core: Remove some leftover dead code in ProviderSchema
This commit is contained in:
parent
72e279e6b2
commit
a34eb4aa76
|
@ -252,7 +252,6 @@ type ProviderSchema struct {
|
||||||
// SchemaForResourceType attempts to find a schema for the given mode and type.
|
// SchemaForResourceType attempts to find a schema for the given mode and type.
|
||||||
// Returns nil if no such schema is available.
|
// Returns nil if no such schema is available.
|
||||||
func (ps *ProviderSchema) SchemaForResourceType(mode addrs.ResourceMode, typeName string) (schema *configschema.Block, version uint64) {
|
func (ps *ProviderSchema) SchemaForResourceType(mode addrs.ResourceMode, typeName string) (schema *configschema.Block, version uint64) {
|
||||||
var m map[string]providers.Schema
|
|
||||||
switch mode {
|
switch mode {
|
||||||
case addrs.ManagedResourceMode:
|
case addrs.ManagedResourceMode:
|
||||||
return ps.ResourceTypes[typeName], ps.ResourceTypeSchemaVersions[typeName]
|
return ps.ResourceTypes[typeName], ps.ResourceTypeSchemaVersions[typeName]
|
||||||
|
@ -263,8 +262,6 @@ func (ps *ProviderSchema) SchemaForResourceType(mode addrs.ResourceMode, typeNam
|
||||||
// Shouldn't happen, because the above cases are comprehensive.
|
// Shouldn't happen, because the above cases are comprehensive.
|
||||||
return nil, 0
|
return nil, 0
|
||||||
}
|
}
|
||||||
s := m[typeName]
|
|
||||||
return s.Block, s.Version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SchemaForResourceAddr attempts to find a schema for the mode and type from
|
// SchemaForResourceAddr attempts to find a schema for the mode and type from
|
||||||
|
|
Loading…
Reference in New Issue