Change-Id: I05ebaf4e11b5b6ca7d9bbb0b2241def7773b11cc
Reviewed-on: https://go-review.googlesource.com/c/go/+/428138
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: xie cui <
523516579@qq.com>
"fmt"
"go/token"
"sort"
+ "strings"
)
type byPos []*CommentGroup
}
sort.Sort(byInterval(nodes))
- var buf bytes.Buffer
+ var buf strings.Builder
fmt.Fprintln(&buf, "CommentMap {")
for _, node := range nodes {
comment := cmap[node]
package ast
import (
- "bytes"
"fmt"
"go/token"
+ "strings"
)
// A Scope maintains the set of named language entities declared
// Debugging support
func (s *Scope) String() string {
- var buf bytes.Buffer
+ var buf strings.Builder
fmt.Fprintf(&buf, "scope %p {", s)
if s != nil && len(s.Objects) > 0 {
fmt.Fprintln(&buf)