code: func (l HostFirewallRulesetList) ByRule(rule types.HostFirewallRule) HostFirewallRulesetList {
  	var matches HostFirewallRulesetList
  
  	for _, rs := range l {
  		for _, r := range rs.Rule {
  			if r.PortType != rule.PortType ||
  				r.Protocol != rule.Protocol ||
  				r.Direction != rule.Direction {
  				continue
  			}
  
  			if r.EndPort == 0 && rule.Port == r.Port ||
  				rule.Port >= r.Port && rule.Port <= r.EndPort {
  				matches = append(matches, rs)
  				break
  			}
  		}
  	}
  
  	return matches
  }
docs: // ByRule returns a HostFirewallRulesetList where Direction, PortType and Protocol are equal and Port is within range