MCPcopy Index your code
hub / github.com/coder/coder / leadOnly

Function leadOnly

agent/agentfiles/files.go:737–741  ·  view source on GitHub ↗

leadOnly returns the leading whitespace of line (spaces and tabs only), excluding the ending.

(line string)

Source from the content-addressed store, hash-verified

735// leadOnly returns the leading whitespace of line (spaces and
736// tabs only), excluding the ending.
737func leadOnly(line string) string {
738 //nolint:dogsled // splitLineParts is the shared decomposer; other parts are genuinely unused here.
739 lead, _, _, _ := splitLineParts(line)
740 return lead
741}
742
743// alignSearchReplace returns the count of leading and trailing
744// lines that match between searchLines and repLines under

Callers 1

buildReplacementLinesFunction · 0.85

Calls 1

splitLinePartsFunction · 0.85

Tested by

no test coverage detected