You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing data to templates using structs is not scalable. For every customization that needs a new field, we need to add a new exported field to either API, Package or InterfaceWrapper struct.
Reference: https://github.com/kcp-dev/code-generator/blob/main/pkg/internal/parser.go#L51-L73
Initializing a new struct and passing info for templates:
Passing data to templates using structs is not scalable. For every customization that needs a new field, we need to add a new exported field to either API, Package or InterfaceWrapper struct.
Reference: https://github.com/kcp-dev/code-generator/blob/main/pkg/internal/parser.go#L51-L73
Initializing a new struct and passing info for templates:
code-generator/pkg/generators/clientgen/gen.go
Line 379 in 4977dcf
Instead of this convoluted process, inspired from upstream code-gen use a
map[string]inteface{}
and keep adding new keys for any additional fields.Reference: https://github.com/kubernetes/code-generator/blob/7d977b3e5454e47ec6b903242616e9ea62644226/cmd/client-gen/generators/generator_for_type.go#L147
The text was updated successfully, but these errors were encountered: