Skip to content

Commit

Permalink
Fix read
Browse files Browse the repository at this point in the history
  • Loading branch information
nickschuch committed Jul 10, 2023
1 parent 6d94cc6 commit 3dad97c
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import (

// Flatten structured object into unstructured.
func Flatten(in map[string]apiextensionsv1.JSONSchemaProps) []interface{} {
flattened := make([]interface{}, len(in))
flattened := make([]interface{}, 0)

for _, value := range in {
for name, value := range in {
row := map[string]interface{}{}

if value.Type != "" {
row[FieldName] = value.Type
}
row[FieldName] = name

if value.Type != "" {
row[FieldType] = value.Type
Expand Down

0 comments on commit 3dad97c

Please sign in to comment.