(v, def, min, max int)
| 100 | } |
| 101 | |
| 102 | func 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. |
| 116 | func (c ProjectConfig) IsZero() bool { |
no outgoing calls
no test coverage detected