Skip to content

Commit fd09781

Browse files
brucegucodeTenglong Gu
andauthored
Add helper function so go template can create slice (#339)
* Add helper function so go template can create slice * Rename new function to Each * Update format for new helper method Co-authored-by: Tenglong Gu <[email protected]>
1 parent 160b839 commit fd09781

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/generate/ack/controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ var (
169169
"CheckNilReferencesPath": func(f *ackmodel.Field, sourceVarName string) string {
170170
return code.CheckNilReferencesPath(f, sourceVarName)
171171
},
172+
"Each": func (args ...interface{}) []interface{} {
173+
return args
174+
},
172175
"GoCodeInitializeNestedStructField": func(r *ackmodel.CRD,
173176
sourceVarName string, f *ackmodel.Field, apiPkgImportName string,
174177
indentLevel int) string {

0 commit comments

Comments
 (0)