Skip to content

Commit

Permalink
adding classifications to the list resource types
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Singer committed Sep 25, 2023
1 parent a4f5be9 commit c1c060c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkg/engine/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,16 @@ func (em *EngineMain) ListResourceTypes(cmd *cobra.Command, args []string) error
return err
}
resourceTypes := em.Engine.ListResourcesByType()
fmt.Println(strings.Join(resourceTypes, "\n"))
typeAndClassifications := map[string][]string{}
for _, resourceType := range resourceTypes {
classifications := em.Engine.ClassificationDocument.Classifications[resourceType]
typeAndClassifications[resourceType] = classifications.Is
}
b, err := yaml.Marshal(typeAndClassifications)
if err != nil {
return err
}
fmt.Println(string(b))
return nil
}

Expand Down

0 comments on commit c1c060c

Please sign in to comment.