mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
code-generator/register-gen: groupName can't use '// +groupName=somegroup ' to override
Signed-off-by: cuisongliu <cuisongliu@qq.com>
This commit is contained in:
parent
a651804427
commit
68ec18a050
@ -82,7 +82,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
|||||||
|
|
||||||
// if there is a comment of the form "// +groupName=somegroup" or "// +groupName=somegroup.foo.bar.io",
|
// if there is a comment of the form "// +groupName=somegroup" or "// +groupName=somegroup.foo.bar.io",
|
||||||
// extract the fully qualified API group name from it and overwrite the group inferred from the package path
|
// extract the fully qualified API group name from it and overwrite the group inferred from the package path
|
||||||
if override := types.ExtractCommentTags("+", pkg.DocComments)["groupName"]; override != nil {
|
if override := types.ExtractCommentTags("+", pkg.Comments)["groupName"]; override != nil {
|
||||||
groupName := override[0]
|
groupName := override[0]
|
||||||
klog.V(5).Infof("overriding the group name with = %s", groupName)
|
klog.V(5).Infof("overriding the group name with = %s", groupName)
|
||||||
gv.Group = clientgentypes.Group(groupName)
|
gv.Group = clientgentypes.Group(groupName)
|
||||||
|
Loading…
Reference in New Issue
Block a user