MCPcopy Create free account
hub / github.com/JanSmrcka/differ / fmtLineNum

Function fmtLineNum

internal/ui/diff.go:226–231  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

224}
225
226func fmtLineNum(n int) string {
227 if n < 0 {
228 return " "
229 }
230 return fmt.Sprintf("%4d", n)
231}
232
233// RenderNewFile renders file content as an all-added diff (for untracked files).
234func RenderNewFile(content, filename string, styles Styles, t theme.Theme, width int) string {

Callers 3

renderCodeLineFunction · 0.85
renderSplitSideFunction · 0.85
TestFmtLineNumFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestFmtLineNumFunction · 0.68