未验证 提交 78c40dc2 编写于 作者: H hongming

fix: return early when err is nil

Signed-off-by: Nhongming <talonwan@yunify.com>
上级 466fd562
......@@ -216,8 +216,8 @@ func (r *ReconcileNamespace) checkAndCreateRoles(namespace *corev1.Namespace) er
err = r.Create(context.TODO(), role)
if err != nil {
klog.Error(err)
return err
}
return err
} else {
klog.Error(err)
return err
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册