mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #100738 from cuisongliu/bug_register-gen_groupName
code-generator/register-gen: groupName can't override
This commit is contained in:
commit
01d2ee8e53
@ -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",
|
||||
// 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]
|
||||
klog.V(5).Infof("overriding the group name with = %s", groupName)
|
||||
gv.Group = clientgentypes.Group(groupName)
|
||||
|
Loading…
Reference in New Issue
Block a user