MCPcopy Index your code
hub / github.com/gokcehan/lf / String

Method String

parse.go:155–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153}
154
155func (e *execExpr) String() string {
156 var buf bytes.Buffer
157
158 buf.WriteString(e.prefix)
159 buf.WriteString("{{ ")
160
161 lines := strings.Split(e.value, "\n")
162
163 for _, line := range lines {
164 trimmed := strings.TrimSpace(line)
165 if trimmed == "" {
166 continue
167 }
168
169 buf.WriteString(trimmed)
170
171 if len(lines) > 1 {
172 buf.WriteString(" ...")
173 }
174
175 break
176 }
177
178 buf.WriteString(" }}")
179
180 return buf.String()
181}
182
183type listExpr struct {
184 exprs []expr

Callers

nothing calls this directly

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected