Skip to content
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

cmd: simplify #56734

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/pgo/irgraph.go
Expand Up @@ -380,7 +380,7 @@ func (p *Profile) PrintWeightedCallGraphDOT(edgeThreshold float64) {

// Determine nodes of DOT.
nodes := make(map[string]*ir.Func)
for name, _ := range funcs {
for name := range funcs {
if n, ok := p.WeightedCG.IRNodes[name]; ok {
for _, e := range p.WeightedCG.OutEdges[n] {
if _, ok := nodes[ir.PkgFuncName(e.Src.AST)]; !ok {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/modload/edit.go
Expand Up @@ -397,7 +397,7 @@ func selectPotentiallyImportedModules(ctx context.Context, limiter *versionLimit
return nil, false, err
}
mods = make([]module.Version, 0, len(limiter.selected))
for path, _ := range limiter.selected {
for path := range limiter.selected {
if !MainModules.Contains(path) {
if v := mg.Selected(path); v != "none" {
mods = append(mods, module.Version{Path: path, Version: v})
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/trace/trace.go
Expand Up @@ -338,7 +338,7 @@ func stackFrameEncodedSize(id uint, f traceviewer.Frame) int {
// The parent is omitted if 0. The trailing comma is omitted from the
// last entry, but we don't need that much precision.
const (
baseSize = len(`"`) + len (`":{"name":"`) + len(`"},`)
baseSize = len(`"`) + len(`":{"name":"`) + len(`"},`)

// Don't count the trailing quote on the name, as that is
// counted in baseSize.
Expand Down