Skip to content

Commit

Permalink
operator-sdk/internal/generate: fix CSV path segments for multi-field…
Browse files Browse the repository at this point in the history
… structs
  • Loading branch information
joelanford committed Nov 2, 2020
1 parent 678fe65 commit 04c0136
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ func (g generator) getMarkedChildrenOfField(root markers.FieldInfo) (map[string]
}
// Create a new set of path segments using the parent's segments
// and add the field to the next fields to search.
parentSegments := make([]string, len(field.pathSegments))
copy(parentSegments, field.pathSegments)
f := &fieldInfo{
FieldInfo: finfo,
pathSegments: append(field.pathSegments, segment),
pathSegments: append(parentSegments, segment),
}
fields = append(fields, f)
// Marked fields get collected for the caller to parse.
Expand Down

0 comments on commit 04c0136

Please sign in to comment.