quota/quota.go
func (s *QuotaService) SetLimit(appName string, limit int) error {
	q, err := s.Storage.Get(appName)
	if err != nil {
		return err
	}
	if limit < 0 {
		limit = -1
	} else if limit < q.InUse {
		return quota.ErrLimitLowerThanAllocated
	}
	return s.Storage.SetLimit(appName, limit)
}
func (s *QuotaService) SetLimit(appName string, limit int) error {
	q, err := s.Storage.Get(appName)
	if err != nil {
		return err
	}
	if limit < 0 {
		limit = -1
	} else if limit < q.InUse {
		return quota.ErrLimitLowerThanAllocated
	}
	return s.Storage.SetLimit(appName, limit)
}
// SetLimit redefines the limit of the app. The new limit must be bigger
// than or equal to the current number of units in the app. The new limit may be
// smaller than 0, which means that the app should have an unlimited number of
// units.
// SetLimit implements SetLimit method from QuotaService interface