MCPcopy Create free account
hub / github.com/microsoft/typescript-go / String

Method String

internal/project/logging/logtree.go:140–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138}
139
140func (c *LogTree) String() string {
141 if c.root != c {
142 panic("can only call String on root LogTree")
143 }
144 var builder strings.Builder
145 header := fmt.Sprintf("======== %s ========\n", c.name)
146 builder.Grow(int(c.stringLength.Load()) + len(header))
147 builder.WriteString(header)
148 c.writeLogsRecursive(&builder, "")
149 return builder.String()
150}
151
152func (c *LogTree) writeLogsRecursive(builder *strings.Builder, indent string) {
153 for _, log := range c.logs {

Callers 2

CloneMethod · 0.95

Calls 7

writeLogsRecursiveMethod · 0.95
panicFunction · 0.85
lenFunction · 0.85
GrowMethod · 0.80
StringMethod · 0.65
intInterface · 0.50
LoadMethod · 0.45

Tested by

no test coverage detected