• Miek Gieben's avatar
    msg.Service: add HostType() method (#627) · 4c9351b0
    Miek Gieben authored
    This method parses the Host field in the service. It returns 1 or 3
    things 1) it is a host 2) an IPv4 address or an 3) IPv6 address.
    This simplifies some code a bit and allows for 1 way of parsing the Host
    field.
    
    This *only* parse the Host field, Mail and/or Text values should be
    checked separately.
    
    We reuse the dns.TypeXXX values for this as to not invent anything new.
    4c9351b0
backend_lookup.go 12.9 KB