From a590de72ddbd259ec36b87abc3835bb26d8dee33 Mon Sep 17 00:00:00 2001 From: runkecheng <1131648942@qq.com> Date: Thu, 31 Mar 2022 16:44:00 +0800 Subject: [PATCH] test static check. --- controllers/mysqluser_controller.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/mysqluser_controller.go b/controllers/mysqluser_controller.go index 672db866c..4a22bafb2 100644 --- a/controllers/mysqluser_controller.go +++ b/controllers/mysqluser_controller.go @@ -176,6 +176,8 @@ func (r *MysqlUserReconciler) reconcileUserInDB(ctx context.Context, mysqlUser * return err } + // test static check + password := string(secret.Data[mysqlUser.Spec.SecretSelector.SecretKey]) if password == "" { return fmt.Errorf("the MySQL user's password must not be empty")