GoPLS Viewer

Home|gopls/cmd/goimports/goimports_gc.go
1// Copyright 2016 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5//go:build gc
6// +build gc
7
8package main
9
10import (
11    "flag"
12    "runtime/trace"
13)
14
15var traceProfile = flag.String("trace""""trace profile output")
16
17func doTrace() func() {
18    if *traceProfile != "" {
19        bwflush := bufferedFileWriter(*traceProfile)
20        trace.Start(bw)
21        return func() {
22            flush()
23            trace.Stop()
24        }
25    }
26    return func() {}
27}
28
MembersX
trace
doTrace
doTrace.BlockStmt.bw
doTrace.BlockStmt.flush
Members
X