// GetNamespaceAndName returns the namespace and name from the runtime.Object
// or an error if either is missing.
GetNamespaceAndName returns the namespace and name from the runtime.Object
or an error if either is missing.
// GetNamespaceAndName returns the namespace and name from the runtime . Object // or an error if either is missing .
func GetNamespaceAndName(object runtime.Object) (namespace, name string, err error) {
	var accessor = meta.NewAccessor()
	namespace, err = accessor.Namespace(object)
	if err != nil {
		return "", "", fmt.Errorf("failed to get namespace for object: %v", err)
	}
	name, err = accessor.Name(object)
	if err != nil {
		return "", "", fmt.Errorf("failed to get name for object: %v", err)
	}
	return namespace, name, nil
}
func GetNamespaceAndName ( object runtime . Object ) ( namespace , name string , err error ) { var accessor = meta . NewAccessor ( ) namespace , err = accessor . Namespace ( object ) if err != nil { return " " , " " , fmt . Errorf ( " " , err ) } name , err = accessor . Name ( object ) if err != nil { return " " , " " , fmt . Errorf ( " " , err ) } return namespace , name , nil }
GetNamespaceAndName returns the namespace and name from the runtime.Object
or an error if either is missing.
GetNamespaceAndName returns the namespace and name from the runtime . Object or an error if either is missing .