-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: enable gocritic.exitAfterDefer #8409
Changes from all commits
52261ec
6777f40
a02567c
20262d3
682443e
5b3bca3
0ecdba4
05517dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,7 +232,7 @@ func start(cmd *cobra.Command, args []string, services ...string) { | |
if err == nil { | ||
log.ReplaceGlobals(cfg.Logger, cfg.LogProps) | ||
} else { | ||
log.Fatal("initialize logger error", errs.ZapError(err)) | ||
log.Panic("initialize logger error", errs.ZapError(err)) | ||
} | ||
// Flushing any buffered log entries | ||
defer log.Sync() | ||
|
@@ -254,7 +254,7 @@ func start(cmd *cobra.Command, args []string, services ...string) { | |
|
||
err = join.PrepareJoinCluster(cfg) | ||
if err != nil { | ||
log.Fatal("join meet error", errs.ZapError(err)) | ||
log.Panic("join meet error", errs.ZapError(err)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have some questions:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
|
||
// Creates server. | ||
|
@@ -266,7 +266,7 @@ func start(cmd *cobra.Command, args []string, services ...string) { | |
serviceBuilders = append(serviceBuilders, dashboard.GetServiceBuilders()...) | ||
svr, err := server.CreateServer(ctx, cfg, services, serviceBuilders...) | ||
if err != nil { | ||
log.Fatal("create server failed", errs.ZapError(err)) | ||
log.Panic("create server failed", errs.ZapError(err)) | ||
} | ||
|
||
sc := make(chan os.Signal, 1) | ||
|
@@ -283,7 +283,7 @@ func start(cmd *cobra.Command, args []string, services ...string) { | |
}() | ||
|
||
if err := svr.Run(); err != nil { | ||
log.Fatal("run server failed", errs.ZapError(err)) | ||
log.Panic("run server failed", errs.ZapError(err)) | ||
} | ||
|
||
<-ctx.Done() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe can
log.Panic("...", zap.error(err))
?