func (r *RateLimiter) Left(id string) (int64, error) {
	// Retrieve attempted count.
	attempted, err := r.Attempted(id)
	if err != nil {
		return 0, err
	}

	// Left is max minus attempted.
	left := r.max - attempted
	if left < 0 {
		return 0, nil
	}

	return left, nil
}
func (r *RateLimiter) Left(id string) (int64, error) {
	
	attempted, err := r.Attempted(id)
	if err != nil {
		return 0, err
	}

	
	left := r.max - attempted
	if left < 0 {
		return 0, nil
	}

	return left, nil
}
func ( r * RateLimiter ) Left ( id string ) ( int64 , error ) { // Retrieve attempted count. attempted , err := r . Attempted ( id ) if err != nil { return 0 , err } // Left is max minus attempted. left := r . max - attempted if left < 0 { return 0 , nil } return left , nil }
// Left returns the number of remaining requests for id during a current
// period.
Left returns the number of remaining requests for id during a current period .