diff options
author | Shulhan <m.shulhan@gmail.com> | 2019-03-09 11:36:37 +0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2019-05-06 22:19:22 +0000 |
commit | ed7f323c8f4f6bc61a75146bf34f5b8f73063a17 (patch) | |
tree | 79a5c2f12147252f05d59e4a69c93309e54a4b77 /src/cmd/trace | |
parent | 04845fe78aeba33106c6f8a40d05e608ca687214 (diff) | |
download | go-git-ed7f323c8f4f6bc61a75146bf34f5b8f73063a17.tar.gz |
all: simplify code using "gofmt -s -w"
Most changes are removing redundant declaration of type when direct
instantiating value of map or slice, e.g. []T{T{}} become []T{{}}.
Small changes are removing the high order of subslice if its value
is the length of slice itself, e.g. T[:len(T)] become T[:].
The following file is excluded due to incompatibility with go1.4,
- src/cmd/compile/internal/gc/ssa.go
Change-Id: Id3abb09401795ce1e6da591a89749cba8502fb26
Reviewed-on: https://go-review.googlesource.com/c/go/+/166437
Run-TryBot: Dave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/trace')
-rw-r--r-- | src/cmd/trace/pprof.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/trace/pprof.go b/src/cmd/trace/pprof.go index 3389d2799b..a31d71b013 100644 --- a/src/cmd/trace/pprof.go +++ b/src/cmd/trace/pprof.go @@ -358,7 +358,7 @@ func buildProfile(prof map[uint64]Record) *profile.Profile { ID: uint64(len(p.Location) + 1), Address: frame.PC, Line: []profile.Line{ - profile.Line{ + { Function: fn, Line: int64(frame.Line), }, |