Skip to content

Conversation

@emersion
Copy link
Contributor

The motivation is to allow Header to hold Unix socket addresses.

Instead of using an IP and a port, use net.Addr, which allows to
represent any network address.

The Header.{Local,Remote}Addr methods are removed since users can now
just access Header.{Source,Destination}Addr.

New helpers (TCPAddrs, UDPAddrs, UnixAddrs, IPs, Ports) allows users to
easily extract data from the generic net.Addr fields.

Closes: #34
Closes: #43


Tests haven't been updated yet, but I'd like to gather some feedback because this is a quite radical change. What do you think?

Copy link
Owner

@pires pires left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's looking good to me so far.

@emersion emersion force-pushed the header-addr branch 2 times, most recently from 7faced6 to d640724 Compare October 26, 2020 08:33
@coveralls
Copy link

coveralls commented Oct 26, 2020

Coverage Status

Coverage increased (+0.5%) to 92.666% when pulling 12eabef on emersion:header-addr into 528b59d on pires:master.

@emersion
Copy link
Contributor Author

All done! This is ready for another review.

Copy link
Owner

@pires pires left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM but we're missing changes to README.md to reflect the breaking changes.

Also, I'll need a bit more time to review this properly.

Thank you very much for the work you've put into this 🤩

The motivation is to allow Header to hold Unix socket addresses.

Instead of using an IP and a port, use net.Addr, which allows to
represent any network address.

The Header.{Local,Remote}Addr methods are removed since users can now
just access Header.{Source,Destination}Addr.

New helpers (TCPAddrs, UDPAddrs, UnixAddrs, IPs, Ports) allows users to
easily extract data from the generic net.Addr fields.

Closes: pires#34
Closes: pires#43
@emersion
Copy link
Contributor Author

we're missing changes to README.md to reflect the breaking changes

Fixed

Also, I'll need a bit more time to review this properly.

Sure, take your time :)

Thank you very much for the work you've put into this

Thanks for maintaining this library!

@pires pires added this to the 0.3.0 milestone Oct 28, 2020
Copy link
Owner

@pires pires left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@pires pires merged commit f4de002 into pires:master Oct 28, 2020
@emersion emersion deleted the header-addr branch October 28, 2020 08:29
@pires pires mentioned this pull request Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Header.{Local,Remote}Addr always return a TCP address Unix socket addresses missing from Header

3 participants