зеркало из https://github.com/golang/tools.git
cmd/goimports: fix -trace flag: flush after stopping trace
Without this change, the created trace files cannot be read by "go tool trace": 2023/12/25 09:51:02 Parsing trace... failed to parse trace: no EvFrequency event Change-Id: I59964875c8e821262db2cc6bbc82b2be385e1618 Reviewed-on: https://go-review.googlesource.com/c/tools/+/553555 Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Michael Stapelberg <stapelberg@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Родитель
5e6f314f28
Коммит
a863a4fcd3
|
@ -19,8 +19,8 @@ func doTrace() func() {
|
|||
bw, flush := bufferedFileWriter(*traceProfile)
|
||||
trace.Start(bw)
|
||||
return func() {
|
||||
flush()
|
||||
trace.Stop()
|
||||
flush()
|
||||
}
|
||||
}
|
||||
return func() {}
|
||||
|
|
Загрузка…
Ссылка в новой задаче