The net package contains the Interfaces function, which lists the network interfaces as a slice of the Interface struct. The Interface struct has the Addrs method, which lists the available network addresses. This way, you can list the addresses by their interfaces.
Another option is to use the InterfaceAddrs function of the net package, which provides the slice of structs that implement the Addr interface. This provides you with methods to obtain the information you want.