1
0
mirror of https://github.com/rancher/norman.git synced 2025-05-11 17:47:56 +00:00

Use CodeName in ranhcer client

This commit is contained in:
Darren Shepherd 2017-12-22 23:46:27 -07:00
parent 94c83962dd
commit a212c8c192

View File

@ -10,7 +10,7 @@ type Client struct {
clientbase.APIBaseClient
{{range .schemas}}
{{- if . | hasGet }}{{.ID | capitalize}} {{.ID | capitalize}}Operations
{{- if . | hasGet }}{{.CodeName}} {{.CodeName}}Operations
{{end}}{{end}}}
func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
@ -24,7 +24,7 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
}
{{range .schemas}}
{{- if . | hasGet }}client.{{.ID | capitalize}} = new{{.ID | capitalize}}Client(client)
{{- if . | hasGet }}client.{{.CodeName}} = new{{.CodeName}}Client(client)
{{end}}{{end}}
return client, nil
}