Skip to content

Commit

Permalink
adding classifications to the list resource types (#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsinger-klotho authored Sep 25, 2023
1 parent a4f5be9 commit db0b2ba
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 := json.Marshal(typeAndClassifications)
if err != nil {
return err
}
fmt.Println(string(b))
return nil
}

Expand Down

0 comments on commit db0b2ba

Please sign in to comment.