(schemas []*SchemaWithPolicy)
| 264 | } |
| 265 | |
| 266 | func getAllResourceGroupsFromSchemas(schemas []*SchemaWithPolicy) []string { |
| 267 | resourcesSet := make(map[string]bool) |
| 268 | for _, schema := range schemas { |
| 269 | metadata, _ := schema.Schema.Metadata["resource_group"].(string) |
| 270 | resourcesSet[metadata] = true |
| 271 | } |
| 272 | resources := make([]string, 0, len(resourcesSet)) |
| 273 | for resource := range resourcesSet { |
| 274 | resources = append(resources, resource) |
| 275 | } |
| 276 | return resources |
| 277 | } |
| 278 | |
| 279 | func filerSchemasByResourceGroup(resource string, schemas []*SchemaWithPolicy) []*SchemaWithPolicy { |
| 280 | var filteredSchemas []*SchemaWithPolicy |
no outgoing calls
no test coverage detected