From f06bad5f2396c19a820cce76621399002ef744ea Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 29 Jul 2021 13:44:18 +0200 Subject: [PATCH] Don't append(x,y) if x is not to be modified ... as append(x,y) would modify x. refs #324 --- cmd/icingadb/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/icingadb/main.go b/cmd/icingadb/main.go index 6b3347e8..75b5c52f 100644 --- a/cmd/icingadb/main.go +++ b/cmd/icingadb/main.go @@ -211,7 +211,11 @@ func run() int { // @TODO(el): The customvar runtime update sync may change because the customvar flat // runtime update sync is not yet implemented. - return rt.Sync(synctx, append(v1.Factories, v1.NewCustomvar), runtimeUpdateStreams) + return rt.Sync( + synctx, + append([]contracts.EntityFactoryFunc{v1.NewCustomvar}, v1.Factories...), + runtimeUpdateStreams, + ) }) if err := g.Wait(); err != nil && !utils.IsContextCanceled(err) {