From 3f7e1c485fa52d59f2c5d38f0b7a2b91161ef1a3 Mon Sep 17 00:00:00 2001 From: zhoujunhao <18853925545@163.com> Date: Wed, 13 Jun 2018 19:44:09 +0800 Subject: [PATCH] [FIX] fix pointer is empty bug --- appruntimesync/clean/clean.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appruntimesync/clean/clean.go b/appruntimesync/clean/clean.go index 6f0eef854..3488504d2 100644 --- a/appruntimesync/clean/clean.go +++ b/appruntimesync/clean/clean.go @@ -120,6 +120,7 @@ func queryK8sServiceResource(m *Manager) []Resource { if ok { if !InSlice(v.Name, val) { s := &k8sServiceResource{ + manager:m, createTime: time.Now(), namespaces: v.Namespace, id: v.Name, @@ -199,6 +200,7 @@ func queryDeploymentResource(m *Manager) []Resource { if ok { if InSlice(v.Name, val) { s := &deploymentResource{ + manager:m, createTime: time.Now(), namespaces: v.Namespace, id: v.Name, @@ -228,6 +230,7 @@ func (s *statefulResource) DeleteResources() error { logrus.Error(err) return err } else { + fmt.Println("删除成功") logrus.Info("delete statefulset success:", s.id) return nil } @@ -279,6 +282,7 @@ func queryStatefulResource(m *Manager) []Resource { if ok { if InSlice(v.Name, val) { s := &statefulResource{ + manager:m, createTime: time.Now(), namespaces: v.Namespace, id: v.Name, @@ -360,6 +364,7 @@ func queryTenantServiceResource(m *Manager) []Resource { diffList := SliceDiff(nameList, allList) for _, v := range diffList { s := &tenantServiceResource{ + manager:m, createTime: time.Now(), id: v, namespaces: v, @@ -432,6 +437,7 @@ func queryRcResource(m *Manager) []Resource { if ok { if InSlice(v.Name, val) { s := &rcResource{ + manager:m, namespaces: v.Namespace, id: v.Name, createTime: time.Now(),