From dfac600ca163d53cea398326c3aef5b54181cb8b Mon Sep 17 00:00:00 2001 From: sabevzenko Date: Thu, 13 Jul 2023 13:27:46 +0300 Subject: [PATCH] grpc default config fix grpc default config fix --- components/guns/grpc/core.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/components/guns/grpc/core.go b/components/guns/grpc/core.go index 30f26f9b8..d38e56faa 100644 --- a/components/guns/grpc/core.go +++ b/components/guns/grpc/core.go @@ -66,14 +66,16 @@ type Gun struct { answLog *zap.Logger } -func DefaultGunConfig() GunConfig { - return GunConfig{ - Target: "default target", - AnswLog: AnswLogConfig{ - Enabled: false, - Path: "answ.log", - Filter: "all", - }, +func DefaultGunConfig() func() GunConfig { + return func() GunConfig { + return GunConfig{ + Target: "default target", + AnswLog: AnswLogConfig{ + Enabled: false, + Path: "answ.log", + Filter: "all", + }, + } } }