mirror of
https://github.com/rancher/norman.git
synced 2025-08-16 06:23:36 +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
|
clientbase.APIBaseClient
|
||||||
|
|
||||||
{{range .schemas}}
|
{{range .schemas}}
|
||||||
{{- if . | hasGet }}{{.ID | capitalize}} {{.ID | capitalize}}Operations
|
{{- if . | hasGet }}{{.CodeName}} {{.CodeName}}Operations
|
||||||
{{end}}{{end}}}
|
{{end}}{{end}}}
|
||||||
|
|
||||||
func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||||
@ -24,7 +24,7 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{range .schemas}}
|
{{range .schemas}}
|
||||||
{{- if . | hasGet }}client.{{.ID | capitalize}} = new{{.ID | capitalize}}Client(client)
|
{{- if . | hasGet }}client.{{.CodeName}} = new{{.CodeName}}Client(client)
|
||||||
{{end}}{{end}}
|
{{end}}{{end}}
|
||||||
return client, nil
|
return client, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user