Commit 75e28b0d authored by David Eads's avatar David Eads

add missing OrDie variant for dynamic client construction

parent 446cf20c
...@@ -36,6 +36,16 @@ type dynamicClient struct { ...@@ -36,6 +36,16 @@ type dynamicClient struct {
var _ Interface = &dynamicClient{} 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) { func NewForConfig(inConfig *rest.Config) (Interface, error) {
config := rest.CopyConfig(inConfig) config := rest.CopyConfig(inConfig)
// for serializing the options // for serializing the options
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment