From cb39b5836f30ac14489799cc48072a1bbf8dade2 Mon Sep 17 00:00:00 2001 From: tanglihao Date: Fri, 3 Mar 2023 12:26:03 +0800 Subject: [PATCH] fix log name conflict --- tools/goctl/rpc/generator/generator.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/goctl/rpc/generator/generator.go b/tools/goctl/rpc/generator/generator.go index 3786e3f8..de7c2564 100644 --- a/tools/goctl/rpc/generator/generator.go +++ b/tools/goctl/rpc/generator/generator.go @@ -21,9 +21,11 @@ func NewGenerator(style string, verbose bool) *Generator { if err != nil { log.Fatalln(err) } - log := console.NewColorConsole(verbose) + + colorLogger := console.NewColorConsole(verbose) + return &Generator{ - log: log, + log: colorLogger, cfg: cfg, verbose: verbose, }