Skip to content

Commit 94401b7

Browse files
authored
Update utils/component/generator.go
Signed-off-by: Lee Calcote <leecalcote@gmail.com>
1 parent 9cc0f3c commit 94401b7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

utils/component/generator.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ func Generate(crd string) (v1alpha1.ComponentDefinition, error) {
9393
}
9494

9595
/*
96-
We walk the entire schema, looking for specific peroperties that requires modification and store their path.
97-
After the walk is complete, we iterate all paths and do the modification.
98-
If any error occurs while updating schema properties, we return nil and skip the update.
96+
Find and modify specific schema properties.
97+
1. Identify interesting properties by walking entire schema.
98+
2. Store path to interesting properties. Finish walk.
99+
3. Iterate all paths and modify properties.
100+
5. If error occurs, return nil and skip modifications.
99101
*/
100102
func UpdateProperties(fieldVal cue.Value, cuePath cue.Path, group string) (map[string]interface{}, error) {
101103
rootPath := fieldVal.Path().Selectors()

0 commit comments

Comments
 (0)