Skip to content

Commit f11537f

Browse files
committed
Rename params that shadowed a built-in
* respolves CRT-A0001 - renames several `max` params to `m` to avoid shadowing
1 parent fcc6d4e commit f11537f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

carbonserver/carbonserver.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -520,14 +520,14 @@ func (listener *CarbonserverListener) SetDoNotLog404s(doNotLog404s bool) {
520520
func (listener *CarbonserverListener) SetFailOnMaxGlobs(failOnMaxGlobs bool) {
521521
listener.failOnMaxGlobs = failOnMaxGlobs
522522
}
523-
func (listener *CarbonserverListener) SetMaxMetricsGlobbed(max int) {
524-
listener.maxMetricsGlobbed = max
523+
func (listener *CarbonserverListener) SetMaxMetricsGlobbed(m int) {
524+
listener.maxMetricsGlobbed = m
525525
}
526-
func (listener *CarbonserverListener) SetMaxMetricsRendered(max int) {
527-
listener.maxMetricsRendered = max
526+
func (listener *CarbonserverListener) SetMaxMetricsRendered(m int) {
527+
listener.maxMetricsRendered = m
528528
}
529-
func (listener *CarbonserverListener) SetMaxFetchDataGoroutines(max int) {
530-
listener.maxFetchDataGoroutines = max
529+
func (listener *CarbonserverListener) SetMaxFetchDataGoroutines(m int) {
530+
listener.maxFetchDataGoroutines = m
531531
}
532532
func (listener *CarbonserverListener) SetFLock(flock bool) {
533533
listener.flock = flock
@@ -637,8 +637,8 @@ func (listener *CarbonserverListener) ShouldThrottleMetric(ps *points.Points, in
637637

638638
return throttled
639639
}
640-
func (listener *CarbonserverListener) SetMaxInflightRequests(max uint64) {
641-
listener.MaxInflightRequests = max
640+
func (listener *CarbonserverListener) SetMaxInflightRequests(m uint64) {
641+
listener.MaxInflightRequests = m
642642
}
643643
func (listener *CarbonserverListener) SetNoServiceWhenIndexIsNotReady(no bool) {
644644
listener.NoServiceWhenIndexIsNotReady = no
@@ -2055,13 +2055,13 @@ type GlobQueryRateLimiter struct {
20552055
maxInflightRequests chan struct{}
20562056
}
20572057

2058-
func NewGlobQueryRateLimiter(pattern string, max uint) (*GlobQueryRateLimiter, error) {
2058+
func NewGlobQueryRateLimiter(pattern string, m uint) (*GlobQueryRateLimiter, error) {
20592059
exp, err := regexp.Compile(pattern)
20602060
if err != nil {
20612061
return nil, err
20622062
}
20632063

2064-
return &GlobQueryRateLimiter{pattern: exp, maxInflightRequests: make(chan struct{}, max)}, nil
2064+
return &GlobQueryRateLimiter{pattern: exp, maxInflightRequests: make(chan struct{}, m)}, nil
20652065
}
20662066

20672067
type ApiPerPathRatelimiter struct {

0 commit comments

Comments
 (0)