• Will Scott's avatar
    add ToIP to complement ToNetAddr · 9a640fd8
    Will Scott authored
    The specific implementations of net.Addr are internal implementation
    details of this package, and a downstream consumner shouldn't relay on
    the internal use of net.IPAddr / net.TCPAddr to implement that interface
    for direct extraction of IP. The consumer would instead need to go through
    a round of string conversion to retreive IP safely. Adding an IP extraction
    function to the interface here will allow the IP to be retreived more
    efficiently.
    9a640fd8
convert.go 6.92 KB