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:
parent
94c83962dd
commit
a212c8c192
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user