d2g / dhcp4client

DHCP Client
Mozilla Public License 2.0
38 stars 30 forks source link

Export the connection interface #19

Closed stapelberg closed 6 years ago

stapelberg commented 6 years ago

This way, packages can pass a ConnectionInt implementation around, which previously was not possible. I.e., previously you had to use dhcp4client.Connection(&literal{}) directly, now you can use:

func createClient(conn dhcp4client.ConnectionInt) *dhcp4client.Client {
    return dhcp4client.New(dhcp4client.Connection(conn))
}
d2g commented 6 years ago

Any reason for the interface name change?

d2g commented 6 years ago

Of course there is..

Yeah makes sense.