Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/jesseduffield/lazygit
/ Limit
Function
Limit
pkg/utils/slice.go:62–67 ·
view source on GitHub ↗
(values []string, limit int)
Source
from the content-addressed store, hash-verified
60
}
61
62
func
Limit(values []string, limit int) []string {
63
if
len(values) > limit {
64
return
values[:limit]
65
}
66
return
values
67
}
68
69
func
LimitStr(value string, limit int) string {
70
n := 0
Callers
2
Call
Method · 0.92
TestLimit
Function · 0.85
Calls
no outgoing calls
Tested by
1
TestLimit
Function · 0.68