File size: 259 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package limit

// Limits contains the current value of all configurable limits.
type Limits map[ID]int

// Max returns the current max value of the limit with the given ID.
func (l Limits) Max(id ID) int {
	v, ok := l[id]
	if !ok {
		return -1
	}
	return v
}