mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-29 14:08:19 +00:00
Rename metadata.NewConfigOrDie to be consistent
Updated name to match dynamic client Kubernetes-commit: 98d87a4f03e22bb8e4d22460855913d23930685a
This commit is contained in:
parent
79ec8b81e2
commit
0f7aa3096b
@ -70,9 +70,9 @@ func ConfigFor(inConfig *rest.Config) *rest.Config {
|
|||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewConfigOrDie creates a new metadata client for the given config and
|
// NewForConfigOrDie creates a new metadata client for the given config and
|
||||||
// panics if there is an error in the config.
|
// panics if there is an error in the config.
|
||||||
func NewConfigOrDie(c *rest.Config) Interface {
|
func NewForConfigOrDie(c *rest.Config) Interface {
|
||||||
ret, err := NewForConfig(c)
|
ret, err := NewForConfig(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
@ -236,7 +236,7 @@ func TestClient(t *testing.T) {
|
|||||||
defer s.Close()
|
defer s.Close()
|
||||||
|
|
||||||
cfg := ConfigFor(&rest.Config{Host: s.URL})
|
cfg := ConfigFor(&rest.Config{Host: s.URL})
|
||||||
client := NewConfigOrDie(cfg).(*Client)
|
client := NewForConfigOrDie(cfg).(*Client)
|
||||||
tt.want(t, client)
|
tt.want(t, client)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user