MCPcopy Index your code
hub / github.com/tinygo-org/tinygo / indentText

Function indentText

errors_test.go:126–128  ·  view source on GitHub ↗

Indent the given text with a given indentation string.

(text, indent string)

Source from the content-addressed store, hash-verified

124
125// Indent the given text with a given indentation string.
126func indentText(text, indent string) string {
127 return indent + strings.ReplaceAll(text, "\n", "\n"+indent)
128}
129
130// Read "// ERROR:" prefixed messages from the given file.
131func readErrorMessages(t *testing.T, file string) string {

Callers 1

testErrorMessagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected