From 3b9a845b292a56d28d8ee2eaf4497f2b0a890af8 Mon Sep 17 00:00:00 2001 From: willson-chen <willson.chenwx@gmail.com> Date: Wed, 24 Jun 2020 16:06:26 +0800 Subject: [PATCH] Update the method to clear slice --- registry/base_configuration_listener.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/base_configuration_listener.go b/registry/base_configuration_listener.go index b67de7791..f9c34c1c9 100644 --- a/registry/base_configuration_listener.go +++ b/registry/base_configuration_listener.go @@ -104,7 +104,7 @@ func ToConfigurators(urls []*common.URL, f func(url *common.URL) config_center.C var override map[string][]string = url.GetParams() delete(override, constant.ANYHOST_KEY) if len(override) == 0 { - configurators = configurators[:0] + configurators = nil continue } configurators = append(configurators, f(url)) -- GitLab