Skip to content

Commit

Permalink
Handle properly CamelCased resource kinds
Browse files Browse the repository at this point in the history
Here is an error without this patch:

c.lister.Snapshotclaims undefined (type SnapshotClaimLister
has no field or method Snapshotclaims, but does have SnapshotClaims)

Signed-off-by: Andrei Vagin <[email protected]>
  • Loading branch information
avagin committed Jul 28, 2017
1 parent 0615395 commit ae00af2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/apiserver-boot/boot/create/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func (c *{{.Kind}}ControllerImpl) Reconcile(u *{{.Version}}.{{.Kind}}) error {
}
func (c *{{.Kind}}ControllerImpl) Get(namespace, name string) (*{{.Version}}.{{.Kind}}, error) {
return c.lister.{{ if not .NonNamespacedKind }}{{ title .Resource }}(namespace).{{ end }}Get(name)
return c.lister.{{ if not .NonNamespacedKind }}{{plural .Kind}}(namespace).{{ end }}Get(name)
}
`

Expand Down

0 comments on commit ae00af2

Please sign in to comment.