|
96 | 96 | "GoCodeCompare": func(r *ackmodel.CRD, deltaVarName string, sourceVarName string, targetVarName string, indentLevel int) string { |
97 | 97 | return code.CompareResource(r.Config(), r, deltaVarName, sourceVarName, targetVarName, indentLevel) |
98 | 98 | }, |
99 | | - "GoCodeIsEqual": func(typeDef *ackmodel.TypeDef, sourceVarName string, targetVarName string, indentLevel int) string { |
100 | | - return code.IsEqualTypeDef(typeDef, sourceVarName, targetVarName, indentLevel) |
101 | | - }, |
102 | 99 | "Empty": func(subject string) bool { |
103 | 100 | return strings.TrimSpace(subject) == "" |
104 | 101 | }, |
@@ -172,20 +169,6 @@ func Controller( |
172 | 169 | return nil, err |
173 | 170 | } |
174 | 171 |
|
175 | | - typeDefs, err := g.GetTypeDefs() |
176 | | - if err != nil { |
177 | | - return nil, err |
178 | | - } |
179 | | - equalVars := templateCompareVars{ |
180 | | - metaVars, |
181 | | - typeDefs, |
182 | | - } |
183 | | - |
184 | | - // Next add the template for pkg/compare/struct.go file |
185 | | - if err = ts.Add("pkg/compare/struct.go", "pkg/compare/struct.go.tpl", equalVars); err != nil { |
186 | | - return nil, err |
187 | | - } |
188 | | - |
189 | 172 | // Next add the template for pkg/version/version.go file |
190 | 173 | if err = ts.Add("pkg/version/version.go", "pkg/version/version.go.tpl", nil); err != nil { |
191 | 174 | return nil, err |
@@ -220,10 +203,3 @@ type templateCmdVars struct { |
220 | 203 | templateset.MetaVars |
221 | 204 | SnakeCasedCRDNames []string |
222 | 205 | } |
223 | | - |
224 | | -// templateCompareVars contains template variables for the template that outputs Go |
225 | | -// code for equality/comparison helper functions. |
226 | | -type templateCompareVars struct { |
227 | | - templateset.MetaVars |
228 | | - TypeDefs []*ackmodel.TypeDef |
229 | | -} |
0 commit comments