mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
add missing OrDie variant for dynamic client construction
This commit is contained in:
parent
446cf20c9f
commit
75e28b0dd4
@ -36,6 +36,16 @@ type dynamicClient struct {
|
||||
|
||||
var _ Interface = &dynamicClient{}
|
||||
|
||||
// NewForConfigOrDie creates a new Interface for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) Interface {
|
||||
ret, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func NewForConfig(inConfig *rest.Config) (Interface, error) {
|
||||
config := rest.CopyConfig(inConfig)
|
||||
// for serializing the options
|
||||
|
Loading…
Reference in New Issue
Block a user