code-generator: Hyphen as last subdomain in groupName breaks client generation
When using groupName as example.code-generation.k8s.io the client generation works.
Changing it to code-generation.k8s.io causes the generated clients to be broken:
https://github.com/mvladev/code-generation:
Generating deepcopy funcs
Generating clientset for example:v1 at github.com/mvladev/code-generation/client/clientset
ERROR: logging before flag.Parse: F1106 07:49:42.418067 80131 main.go:69] Error: Failed executing generator: some packages had errors:
errors in package "github.com/mvladev/code-generation/client/clientset/versioned":
unable to format file "/Users/i068969/git/go/src/github.com/mvladev/code-generation/client/clientset/versioned/clientset.go" (6:6: expected 'STRING', found '-' (and 10 more errors)).
errors in package "github.com/mvladev/code-generation/client/clientset/versioned/scheme":
unable to format file "/Users/i068969/git/go/src/github.com/mvladev/code-generation/client/clientset/versioned/scheme/register.go" (8:6: expected 'STRING', found '-' (and 4 more errors)).
errors in package "github.com/mvladev/code-generation/client/clientset/versioned/fake":
unable to format file "/Users/i068969/git/go/src/github.com/mvladev/code-generation/client/clientset/versioned/fake/clientset_generated.go" (4:10: expected 'STRING', found '-' (and 9 more errors)).
unable to format file "/Users/i068969/git/go/src/github.com/mvladev/code-generation/client/clientset/versioned/fake/register.go" (4:6: expected 'STRING', found '-' (and 4 more errors)).
errors in package "github.com/mvladev/code-generation/client/clientset/versioned/typed/code-generator/v1":
unable to format file "/Users/i068969/git/go/src/github.com/mvladev/code-generation/client/clientset/versioned/typed/code-generator/v1/code-generator_client.go" (11:10: expected type, found '-' (and 2 mor
e errors)).
unable to format file "/Users/i068969/git/go/src/github.com/mvladev/code-generation/client/clientset/versioned/typed/code-generator/v1/testtype.go" (40:26: missing ',' in parameter list).
errors in package "github.com/mvladev/code-generation/client/clientset/versioned/typed/code-generator/v1/fake":
unable to format file "/Users/i068969/git/go/src/github.com/mvladev/code-generation/client/clientset/versioned/typed/code-generator/v1/fake/fake_testtype.go" (16:16: expected ';', found '-' (and 1 more er
rors)).
unable to format file "/Users/i068969/git/go/src/github.com/mvladev/code-generation/client/clientset/versioned/typed/code-generator/v1/fake/fake_code-generator_client.go" (10:14: expected type, found '-'
(and 2 more errors)).
- bad imports
code-generatorv1 "github.com/mvladev/code-generation/client/clientset/versioned/typed/code-generator/v1" - interfaces have hyphen in them
Code-generatorV1() code-generatorv1.Code-generatorV1Interface
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 21 (8 by maintainers)
Commits related to this issue
- Change api's group to cluster.k8s.io Rationale: - tautology - we know that the group will hold API definitions - consistency - all other main k8s groups have a single word subdomain: storage.k8s.io... — committed to mvladev/kube-deploy by deleted user 7 years ago
- Change api's group to cluster.k8s.io Rationale: - tautology - we know that the group will hold API definitions - consistency - all other main k8s groups have a single word subdomain: storage.k8s.io... — committed to mvladev/kube-deploy by deleted user 7 years ago
- Change api's group to cluster.k8s.io Rationale: - tautology - we know that the group will hold API definitions. - consistency - all other main k8s groups have a single word subdomain: storage.k8s.i... — committed to mvladev/kube-deploy by deleted user 7 years ago
- Change api's group to cluster.k8s.io Rationale: - tautology - we know that the group will hold API definitions. - consistency - all other main k8s groups have a single word subdomain: storage.k8s.i... — committed to mvladev/kube-deploy by deleted user 7 years ago
- Change api's group to cluster.k8s.io Rationale: - tautology - we know that the group will hold API definitions - consistency - all other main k8s groups have a single word subdomain: `storage.k8s.i... — committed to mvladev/kube-deploy by deleted user 7 years ago
- Change api's group to cluster.k8s.io Rationale: - tautology - we know that the group will hold API definitions - consistency - all other main k8s groups have a single word subdomain: `storage.k8s.i... — committed to mvladev/kube-deploy by deleted user 7 years ago
- Change api's group to cluster.k8s.io Rationale: - tautology - we know that the group will hold API definitions - consistency - all other main k8s groups have a single word subdomain: `storage.k8s.i... — committed to k4leung4/kube-deploy by deleted user 7 years ago
I have the same issue. Seems that “-” symbol can by used in the groupName