diff --git a/components/grpc/import/import.go b/components/grpc/import/import.go index 57cc8276c..b624b44e5 100644 --- a/components/grpc/import/import.go +++ b/components/grpc/import/import.go @@ -19,5 +19,5 @@ func Import(fs afero.Fs) { return grpcjson.NewProvider(fs, conf) }) - register.Gun("grpc", grpc.NewGun, grpc.DefaultGunConfig()) + register.Gun("grpc", grpc.NewGun, grpc.DefaultGunConfig) } diff --git a/components/guns/grpc/core.go b/components/guns/grpc/core.go index d38e56faa..30f26f9b8 100644 --- a/components/guns/grpc/core.go +++ b/components/guns/grpc/core.go @@ -66,16 +66,14 @@ type Gun struct { answLog *zap.Logger } -func DefaultGunConfig() func() GunConfig { - return func() GunConfig { - return GunConfig{ - Target: "default target", - AnswLog: AnswLogConfig{ - Enabled: false, - Path: "answ.log", - Filter: "all", - }, - } +func DefaultGunConfig() GunConfig { + return GunConfig{ + Target: "default target", + AnswLog: AnswLogConfig{ + Enabled: false, + Path: "answ.log", + Filter: "all", + }, } }