mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-03-29 02:12:44 +08:00
Update generated clients after removing always-nil setConfigDefaults error return value
Kubernetes-commit: 2c24a12804ca0020e57592a6844f7c5874dffcfe
This commit is contained in:
parent
a3e089d3f3
commit
399ae99195
@ -45,9 +45,7 @@ func (c *SamplecontrollerV1alpha1Client) Foos(namespace string) FooInterface {
|
|||||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||||
func NewForConfig(c *rest.Config) (*SamplecontrollerV1alpha1Client, error) {
|
func NewForConfig(c *rest.Config) (*SamplecontrollerV1alpha1Client, error) {
|
||||||
config := *c
|
config := *c
|
||||||
if err := setConfigDefaults(&config); err != nil {
|
setConfigDefaults(&config)
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
httpClient, err := rest.HTTPClientFor(&config)
|
httpClient, err := rest.HTTPClientFor(&config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*SamplecontrollerV1alpha1Client, error) {
|
|||||||
// Note the http client provided takes precedence over the configured transport values.
|
// Note the http client provided takes precedence over the configured transport values.
|
||||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SamplecontrollerV1alpha1Client, error) {
|
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SamplecontrollerV1alpha1Client, error) {
|
||||||
config := *c
|
config := *c
|
||||||
if err := setConfigDefaults(&config); err != nil {
|
setConfigDefaults(&config)
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -84,7 +80,7 @@ func New(c rest.Interface) *SamplecontrollerV1alpha1Client {
|
|||||||
return &SamplecontrollerV1alpha1Client{c}
|
return &SamplecontrollerV1alpha1Client{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) {
|
||||||
gv := samplecontrollerv1alpha1.SchemeGroupVersion
|
gv := samplecontrollerv1alpha1.SchemeGroupVersion
|
||||||
config.GroupVersion = &gv
|
config.GroupVersion = &gv
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
@ -93,8 +89,6 @@ func setConfigDefaults(config *rest.Config) error {
|
|||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user