Skip to content

Commit

Permalink
Fix grpc gun startup bug
Browse files Browse the repository at this point in the history
quickfix
  • Loading branch information
nickclmb committed Jul 13, 2023
1 parent dfac600 commit 4d62339
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion components/grpc/import/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
18 changes: 8 additions & 10 deletions components/guns/grpc/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
}
}

Expand Down

0 comments on commit 4d62339

Please sign in to comment.