code: func (md *MobileDetect) matchUAAgainstKey(key int) bool {
  	ret := false
  	rules := md.rules.mobileDetectionRules()
  	for ruleKey, ruleValue := range rules {
  		if key == ruleKey {
  			ret = md.match(ruleValue)
  			break
  		}
  	}
  
  	return ret
  }
docs: //Search for a certain key in the rules array.
  //If the key is found the try to match the corresponding regex agains the User-Agent.