MCPcopy Create free account
hub / github.com/JordanCoin/codemap / clampRange

Function clampRange

config/config.go:102–113  ·  view source on GitHub ↗
(v, def, min, max int)

Source from the content-addressed store, hash-verified

100}
101
102func clampRange(v, def, min, max int) int {
103 if v <= 0 {
104 return def
105 }
106 if v < min {
107 return min
108 }
109 if max > 0 && v > max {
110 return max
111 }
112 return v
113}
114
115// IsZero reports whether the config has no active project policy.
116func (c ProjectConfig) IsZero() bool {

Callers 2

HubDisplayLimitMethod · 0.85
RoutingTopKOrDefaultMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected