MCPcopy Create free account
hub / github.com/algolia/cli / Indent

Function Indent

pkg/text/indent.go:10–15  ·  view source on GitHub ↗
(s, indent string)

Source from the content-addressed store, hash-verified

8var lineRE = regexp.MustCompile(`(?m)^`)
9
10func Indent(s, indent string) string {
11 if len(strings.TrimSpace(s)) == 0 {
12 return s
13 }
14 return lineRE.ReplaceAllLiteralString(s, indent)
15}

Callers 6

AddInheritedFlagsMethod · 0.92
DisplayEntriesMethod · 0.92
runUpdateCmdFunction · 0.92
runOperationsCmdFunction · 0.92
runImportCmdFunction · 0.92
Test_IndentFunction · 0.85

Calls

no outgoing calls

Tested by 1

Test_IndentFunction · 0.68